My actor just works 1 time!
EpicoreGames
Member Posts: 188
So in my game , 5 actors are created. I make them drop from the top of the screen . But they would just drop 1 time and it won't keep dropping.
Any solution to make it keep dropping ?
P.S. i want it to come down from outside the screen to inside the screen.
Comments
Make an actor and place it at the top of the scene out of view then add 4 more of the same actor.
Add a move behaviour to the actor and set it to move down by setting direction to 270 speed 200 (or whatever speed you want).
Then simply make a rule if self.position.y is < -20 in the rule add a change attribute self.position.y to 400 for e.g. you might have to change those numbers depending on device and portrait landscape but you get the idea.
You could also change the x position each time they have fallen by doing a change attribute self.position.x to random (0,480) again change those number to suit.
You could also try scene wrap, you would need to go to the scene tab and check one of the boxes for Wrap X or Y.
will they keep dropping down? or just drop for one time and it ends?
the main problem i need to fix now is letting it keep on dropping every time one actor is destroyed and it respawn and drop down from outside the screen.
how could i do that?
i can't loop it
Instead of destroying simply move it back to the top out of the scene by changing its Y position.
could you please explain this?
"if self.position.y is < -20 in the rule add a change attribute self.position.y to 400"
why when y is smaller than -20? and why change it's position to 400?
i am just a newbie...
I hope you could explain it if you're not feeling getting bothered
thank you
i changed its y position but nothing happens . Help please!!
this would work
Ok I'll try
Self position Y is the vertical coordinate for the actor, 0 is at the bottom of the screen, and the values rise as you move up the screen - so this is looking to see if you've dropped below the bottom of the screen and is then moving you back up to the top.
okay.... i got new problems T.T
when i checked wrap Y , after i clicked on the actor , it did come down again but when i clicked on it this time it doesn't give any damn of me just keep coming down from top to bottom, and it keep going faster ( like looping and +1 per time but i didn't set that. )
Another problem is that when i first click preview , it appears in two row , one row at the bottom and one row at the top
How do i solve it? Help pls
I didn't understand any of that ! What is 'T.T.' ? What does 'it doesn't give any damn of me' mean ? What does '+1 per time' mean ?