So right now i have
system > Every 1 second
System > pick random instance spawn
System create object Monster on layer 0 at floor(random(x,y)) , floor(random(x,y))
How do i make it stop spawning after a certain amount has been spawn?
i dont quite understand.. :C
im still new to construct 2 can you please explain?
add a sub-event for 'every 1 second'
"system -> compare two values -> monster.count, less or equal, (the limit of its amount you want)
so this means system will only spawn that object if its count is less or equal than your determined amount
okay i tried that but it doesn't work
i don't know if i did that correctly
here's a screen shot.
you did the "compare two values" event false. the think you did is "greater or equal". change it to "less or equal"
okay i i changed it but it still doesnt limit the spawning.
Heres my capx
i feel really confused at the moment sorry :/
My bad, sorry
Make "compare two values" like this, not as a sub event
it should work fine now
Oh WOW thanks alot it worked!
You're welcome. Good luck.
Is there also a way for me to make it not too spawn anymore after a specified amount?
You could create a global variable MonstersCreated
on monster created - system add 1 to MostersCreated
and in the spawnevent add a condition
system compare two values : MonstersCreated < 50 (or whatever the maximum amount of monsters you'd like to be created is)
Can you please screen shot what you just explained :/
i dont quite understand
heres my capx and at the bottom is what i tried to do
Develop games in your browser. Powerful, performant & highly capable.
Here's an edited and commented capx..
you mean like this