GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

keeping space between moving actors

kevintsekevintse Posts: 3Member
I want to have actors of the same prototype which spawn (control by the user) at the same location and walk in the same direction. How can I maintain space between each of them other than restricting how often the user the spawn the actors?

Thanks.

Comments

  • old_kipperold_kipper Posts: 1,420Member
    Perhaps you could use a system where there is a controlled x value (by the player) and the spawned actor on birthing notes its offset from the x and then is constrained to the x with that offset. I am not sure quite what you are doing so there might be a far better system for the case you require. Adding things like jumps and collisions with other objects might well cause problems but this is down to the design of the scene.

    An other method would be to have each actor maintain there x position in a game attribute (that they self selected when spawning based on a spawn numbering attribute), and be controlled unless they entered within the territory of the next actor. In this case you would have to swap the < and > limits based on going left or right so it was possible to start the string of actors moving again if they all stopped moving by having either end actor leading off and freeing the others.

    just some ideas....

    kipper
  • kevintsekevintse Posts: 3Member
    Awesome help, I really appreciate it!
This discussion has been closed.