Spawning an actor from any 4 spawn points?
Hi guys,
Basically i was wondering how to spawn an actor from any of the 4 spawn points i have set up. The 4 spawn points are 4 actors dotted around(named spawn1-4). Im guessing its having a game attribute called spawn as an integer, then wenever i want to, change attribute game.spawn to a random 1-4. Then have a rule if game.spawn = 1, spawn actor at x,y relating to that spawn point?
Am i on the right lines?
Thanks in advance.
Basically i was wondering how to spawn an actor from any of the 4 spawn points i have set up. The 4 spawn points are 4 actors dotted around(named spawn1-4). Im guessing its having a game attribute called spawn as an integer, then wenever i want to, change attribute game.spawn to a random 1-4. Then have a rule if game.spawn = 1, spawn actor at x,y relating to that spawn point?
Am i on the right lines?
Thanks in advance.
Comments
then when randomPoint=1 change position or spawn wherever
then when randomPoint=2 change position or spawn wherever
ect..
10-14 for one type of enemy. 20-24 for other etc.
Shadows Peak is an atmospheric psychological horror that explores the dark side of a player.
Do this:
Make a new actor. (and put it on the stage
Inside:
Make a new integer attribute named 'spawnpoint'
make a timer behaviour
every 'X' secs (where X stands for the frequency you want the actors to spawn)
change attribute 'spawnpoint' to 'random(1,4)'
Then a set of rules
when attribute 'spawnpoint' is '1'
spawn actor 'actortospawn' (the actor you want to spawn)
Then on position x and y you can enter the position of the 4 points you mentioned earlier.
Make sure it is relative to scene and no actor.
Do this last bit for all 4 spawnpoints
Cheers,
Ludwig
Lump Apps and My Assets
Sorry for all the questions.