Redirect spawned actors

simo103simo103 Member, PRO Posts: 1,331
edited November -1 in Working with GS (Mac)
anyone can help please? I am spawning numerous actors and want them to move in on the x axis to collide with another actor and have that collision cause one spawned actor to redirect to move up and the next one down and the next one up etc.
Any ideas?
Thanks in advance,
S

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    bump .... further to above .. imagine marching soldiers .. once one hits a spot he turns left, the next hits the spot turns right, the next turns left etc ... as a continuous stream of marchers walk on to the scene.

    Any ideas ... can any variables be added to an actor when its spawned?

    thanks.

    S
  • simo103simo103 Member, PRO Posts: 1,331
    cool .. I solved my own problem ... actual TSB had an old forum post that tipped me in the right direction (thanks for that).

    Anyway just in case it helps anyone else .... I created a Direction_angle attribute in the Game settings and a Actor_direction in the Self settings set to 0 to start. When the spawned actor is created I had it move in the Self.Actor_direction angle.

    Once it hit the Redirect Actor I had it change the Self.Actor_Direction to 90 and the Game.Direction_angle to 90 if the Game.Direction_angle was 0 or 270 ..... and also change it to 270 if the Game.direction_angle was 90.

    Thus one actor went up and the next down, the next up etc.

    I guess the lesson learned was that individual attributes can be set on each spawned actor.

    I can't upload a template as I am on 0.8.9 still but if anyone needs further help just ask.

    S
Sign In or Register to comment.