how to spawn an actor in the same position every scene

AEPstudiosAEPstudios Member Posts: 110
edited July 2012 in Working with GS (Mac)
i want an actor spawned in the same position in every scene, i want to give it a direct position for 100% accuracy,
please help thanks

Best Answer

  • ericzingelerericzingeler Posts: 334
    edited July 2012 Accepted Answer
    Create a Position X real game attribute and a Position Y real game attribute. Set those Position X and Y attributes to the coordinates of your choice.

    Now in the spawn actor behavior, set Position X to game attribute Position X and Position Y to game attribute Position Y. Set the bottom "Relative to:" drop down to the scene option.

    done.

Answers

  • AEPstudiosAEPstudios Member Posts: 110
    but what actor do i set the spawn actor behaviour in ?
  • kobayaashikobayaashi Member, PRO Posts: 143
    I tend to put my spawn actor instructions in the background actor, unless the spawning is the result of actor interaction (such as spawning following an attack, destruction, or attribute change in another actor)...

    There may be a better way for your needs, but it works fine for me...
  • MotherHooseMotherHoose Member Posts: 2,456
    @AEPstudios … for your scenario of spawn in same position in every scene

    on the actor being spawned:
    1st behaviors …
    -changeAttribute: self.Position.X To: the correctX
    -changeAttribute: self.Position.Y To: the correctY

    no gameAttributes needed (conserve resources)
    and you can leave the Positions for the spawn at 0

    … spawnBehavior can be on any actor in the layer where that spawnedActor is active

    often best to have an actor control its own behavior … such as position

    image MH
Sign In or Register to comment.