Target a spawned character and edit its rotation.
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?
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
-
MotherHoose Posts: 2,456
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)
Otherwise:
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 directionMH
Answers