I have a path and the x and y coordinates are in an array.
Object 1 reads the x and y coordinates and starts moving. How do I make object 2 read the array from the beginning while object 1 is still getting data from the array?
I figured it out. I have 10 instances:
global variable i=0
Instance 1 starts at i (i=0 zero-based in the array)
Instance 2 starts at -10+i = -10 element in the array
Instance 3 starts at -20+i = -20 element in the array
and so on and so on....
add 1 to i and everything moves up 1 position
So on start of layout I draw an attack wave with circular motion holding down the mouse button, the x and y mouse coordinates are then stored in the array, when the mouse button is released the enemy sprites load in the coordinates from the array one by one....this is cool if you want to make a game like Gyruss, Tempest or Galaga. These games have predefined attack waves
I am not sure but i think you can have the same thing done by using the Pathfinding Behavior.
Not sure though, it's been years since i used that behavior but i am confident it can though.
I tried Pathfinding but it doesn't give you much control. In Pathfinding you have to make obstacles, right? Recording the mouse movement and then storing the data and reading it back in requires no obstacles. All you have to do is draw out the attack wave. Editing the data in excel gives you more control. But that's my opinion. I will make a link to the .capx file
Develop games in your browser. Powerful, performant & highly capable.
So here is the link:
Just hold down the left mouse button while drawing the path. When done release the mouse button.
I updated the link.
Hold down the left mouse button while drawing the path for a single attack wave.
Hold down the right mouse button while drawing the path for a double attack wave. (Like in Gyruss I love that game)
All data is stored in the array. Let me know if this was helpful.