How can spawn actor in delimited area?
aitor010
Member Posts: 282
Hi!
I have this scene: http://s2.subirimagenes.com/imagen/previo/thump_869277220131111-19.png
I want that in the black area use spawn behavior for make an actor every 2 second. How can I do this?
Thanks in advance!!
I have this scene: http://s2.subirimagenes.com/imagen/previo/thump_869277220131111-19.png
I want that in the black area use spawn behavior for make an actor every 2 second. How can I do this?
Thanks in advance!!
Comments
If you want the spawned actor to appear at X200 Y300 then type in X=200 and Y=300.
Timer: Every 2 seconds
In the Timer add a Spawn Actor to spawn whatever actor you want
This new actor will spawn from the center of the Black actor, if you want it to spawn anywhere within the bounds of only the Black Actor, add this to the Spawn Actor Behavior:
Position X: Random(-[1/2 Horizontal size of your actor],[1/2 Horizontal size of your actor])
Position Y: Random(-[1/2 Vertical of your actor],[1/2 Vertical size of your actor])
so if you're actor is 100 pixels wide you'd do:
Position X: Random(-50,50)
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
I take a photo of my screen http://s2.subirimagenes.com/imagen/previo/thump_869280920131111-20.png
This: "Position X: Random(-[1/2 Horizontal size of your actor],[1/2 Horizontal size of your actor])" How translate? The size is 25x25. I test and not run. Thanks in advance!
@Socks I want will be random and move random in black screen.
Like I said in the other thread, the more info you give the better answers you'll get >- and faster too, so maybe take a little time to include some basic details in your post, if you'd said you want the actors to appear randomly within that area your questions would be less subject to (wrong*) interpretation.
*by me ">
What is half of 25 ?
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page