Spawn Direction

Hello,I want to make moving spawner to left and right after few seconds spawner spawn actor in same direction as spawner is.
Thanks for any help

Comments

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @notatoto

    here are two possible ways.

    1. Using a game level attribute:
      Set a game level attribute, indicating the direction the spawner is traveling.
      Then spawn the new actor. This actor then checks the game level attribute to see which direction it should travel in.

    2. Passing the value:
      You can also pass the direction by setting the rotation in the spawn behavior. Set rotation to 0 for right, 180 for left.
      Let the spawned actor then read this value, allowing you to set its direction of travel.
      Straight after, correct the spawned actor's rotation by setting it to 0 again.

  • notatotonotatoto Member Posts: 3
    edited April 2016

    Thanks for your answer

    In the 1. way - How can i make a game level attribute, indicating the direction the spawner is traveling? Sorry but i havent idea :smile:

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @notatoto , attached is a project showing both ways. Hope it helps.

    I suggest you read up on game level attributes and self attributes in the manuals to get a good understanding of how and why to use each.

  • notatotonotatoto Member Posts: 3

    Very helpful,thank you so much!

Sign In or Register to comment.