spawn actor from different places
Disimob
Member, PRO Posts: 32
Hi
someone can help me to simulate the rain? I need a single drop that starts from x random (20,300) and Y = 480 (top of my screen.)
THX
Comments
To simulate rain, use rules like this:
Timer-Every 0.1 Seconds-Spawn Actor(Rain Drop Image) Place-In front of actor
from position-functions-random(20,300), 480)
You learn something every time you read something on this forum
What I've done when having actors spawn at random places is that I use moving "spawners"
That can work too.
@illaciaerik Good idea! May You write An example About how to move spawners?
Thx a lot for your time
Depending on the game, spawning loads of rain drops might be pretty intensive for the engine. Two easier work arounds would be:
Have 15 or so version of a rain drop. Have their x position change to a random location on load, and make them fall using y linear velocity. When they fall below the edge of the screen, change their y attribute to the top of the screen and again change their x attribute to something random. This way the same rain drop will fall forever and you won't have to spawn anything.
OR.
Do it with an animation. You could have a 10-15 frame animation that simulates rain, place it on an actor that sits above everything else and covers the whole screen.