oosyrag's Forum Posts

  • Assuming your different values are instance variables, you can create a function to spawn enemy with a parameter "enemy type". In the function, seperate out if enemy type=a then set certain variables, if enemy type=b then set variables, ect.

    Create your behaviors based on each enemy's instance variables.

  • No noticeable difference.

    Edit: Loops can cause issues if you are not careful with them.

  • It may be better to just stick with a simple variable, if you don't need to store much information about each entity in the queue. Here is an example - https://www.dropbox.com/s/mz3e0ys26mfo5 ... .capx?dl=0

    For multiple queues, it will be a smart idea to use an invisible helper sprite to mark the start of each queue. This helper sprite can also be used to help position new customers and keep track of queue size. You will also be able to associate each customer with a particular queue by saving the UID of the helper sprite.

    I'll get back to this and update with a better example when I have time.

  • Sorry messed up a bit on the math. Here is a partial example:

    https://www.dropbox.com/s/6j58ma2hlg7z2 ... .capx?dl=0

    Some issues that need to be addressed:

    Sprite jumps to cursor upon first click - Can be adjusted for by storing the difference between Mouse.X and Sprite.X in a variable

    Doesn't work with 90 or 270 degree angles

    Only works on X motion - Both of these can be fixed by making a second version that works on the y axis, and utilizing proper conditions to choose which one to use based on mouse movement.

  • You could keep track of each sprite in an array, which gives you lots of options for queueing by using the push and delete actions, or you can use a variable to keep track of the queue size and use that as a multiplier for x position when spawning.

    The invisible sprite idea is also acceptable, but is limited to a fixed amount of positions. If you're worried about too many objects being clunky to work with, you can use one stretched out line with multiple image points instead.

  • To do so, you'll need to save the originalposition of the object in variable when you start dragging, then set object position to x, y where x is mouse or touch.x, and y is tan(angle)*(mouse.x-originalx)+originaly

  • Just an idea, but in the event that you are not running full screen (allowing your mouse to get off the window), try having a couple pixels of dead zone right around the edge that does not scroll. If you are full screen, I think you would not want this dead zone, but there are conditions to take care of that.

  • Try a bullet behavior with randomized angles as well to make it move.

    Whenever they are ready to.

  • Add event, on overlap wall set speed to 0.

  • It can be done with a little creativity, but not in a single textbox. Build your text one letter at a time with seperate objects.

    https://www.dropbox.com/s/211xd1ir76hq8 ... .capx?dl=0

    In the example I used a text object, but you should definitely use spritefont. Also, you can use a loop instead of every x seconds to get rid of the typewriter effect.

    To simplify things, you can have two spritefont objects - one red version one black, and just create the suitable one with conditions. You can trigger the color change and end with an escape character in your string that doesn't actually get displayed.

    Edit: Alternatively, you may want to look into positioning a tint layer effect over the words you want colored...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Greyness is the lack of all color. Try lowering red and green to 20-30 each and blue about 0-10. You can adjust brightness or saturation with another layer effect as well if you want. Otherwise, have you tried the gray scale effect?

  • OR

  • It should be in a container, so when your peer player sprite is created, they get an AimSpot as well.

  • Oops, silly me, you're right.

    I did notice when I tried it as shown in the screen shot, the first object created starts at level 2. This is because you have the initial object placed in the editor, which will trigger level to increase to 1 immediately. Then in your loop, you create the first one, which increases the level global variable to 2, then that gets set to the instance variable.