Howdy, Stranger!

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

Target a spawned character and edit its rotation.

rommaromma Posts: 114Member
edited March 2012 in Working with GS (Mac)
Hi Guys,

I have (every .2 seconds) actors spawning in different positions (X, Y from table) This works fine, but Ive encountered an issue.

I have actors spawning around the entire border of the scene, so technically some need to be facing down, facing left and right. For performance's sake and my sanity I want to use 1 actor and rotate the spawns IF (conditional) its at certain point in X, Y. I can't seem to target a specific spawned actor, is there a way to do this?

Best Answer

  • MotherHooseMotherHoose Posts: 2,456Member
    Accepted Answer
    the spawned Actor controls the direction it is facing:

    on spawnedActor:
    Rule: when
    Attribute: self.Position.Y ≥ 200 (just an example Y position)
    --changeAttribute: self.Rotation To: 270 (down)
    Rule: when
    Attribute: self.Position.Y ≤ 100
    --changeAttribute: self.Rotation To: 90 (up)

    and, do a rule for X position for left and right

    you can use changeAttribute: self.Image To: … if you need images for the direction

    image MH


  • calvin9403calvin9403 Posts: 3,190Member
    do you mean a specfic one or do you want all the actors to face a point?
  • rommaromma Posts: 114Member
    A specific spawned actor.
  • rommaromma Posts: 114Member
    Thanks MH, last tip was something I didn't think of!
This discussion has been closed.