how to make the actor to move up and down againg and again
ronre
Member Posts: 38
hello,
i have actor that spawned every x time and i want him to move up and down.
i tried to do that with two timers and two "move to",
one timer: for 1, move self.position.y+1
timer two: after 1,move self.position.y-1
and all this in a timer "every 2 second".
its not working. how should i do that?
Comments
Constrain Y position to:
AAA * sin (self.time * BBB) + CCC
. . . . . . . .
AAA = how far you want your actor to move.
BBB = how fast you want your actor to move.
CCC = the centre point of the movement.
hey, how exactly to do that? inside the "move"?
and its possible to stop the actor movement in his position by clicking on the screen?
Use a Constrain behaviour.
Wrap the Constrain behaviour in a rule that says:
When mouse button is down . . . have nothing in the rule section - and place the Constrain behaviour in the 'otherwise' section.
thank you. when i use the constrain behavior its canceled the spawner random position.
i mean, the spawner spawn actor in randomal "y" and the constrain behavior canceled it.
2. the stop in the actor movement is only when i hold the click. how can i make the actor to stop his movement after click. without pressing.
Here's a demo that locks into position when you click on the moving actor. It also spawns a "center" actor to show where the original position of the spawned actor was.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
great. thank you!!
.