Actors spawn a specific number of times in random order
kikkan
Member Posts: 24
Hey guys,
I´m gonna make a game where actors spawn I waves,
and I want the different actors to spawn in random order,
and I want for example that actor (A) spawns 2 times acter (B) spawns 5 times and actor (c) spawns 10 times and so on.
I don´t understand how to go around to solve this, so if anyone know?
I would be very grateful for any tips
(sorry for my bad english grammar)
Comments
anyone?
What is the max amount of actors you want to spawn?
I am not sure yet as I will have to try and fail to see, but probably many, I won´t spawn all at the same time tho, I´m thinking that table is probably the best way of doing it since it is going to be so many, but I don´t know how
Will this be changing each level or is it a survival game all in one level? I would like to help but I can't wrap my brain around how to do this!
At least you spelled grammar right!
For now the plans are that it will all happen in one scene, and yeah it is a survival, I was thinking that it wil first maybe spawn 5 actors, the second wave maybe 10 actors, then third wave will have 15 actors(not all of same type), and so on. (these numbers can change, gotta try what works best)
I would do this- new game integer: game.Level
Then make bad guy, and a boss.
Then make a spawner.
In spawner put in this rule and more to make more. This seems like it will be very performance heavy so there might be a better way.
IN SPAWNER:
Rule
if attribute game.Level = 1
:do:
-timer: after:5
-:do: spawn actor bad guy (then put a timer in this timer)
--timer: after:1,
--:do: spawn actor bad guy (then make another timer in this timer)
---timer: after:1
---:do: spawn actor bad guy (then make another timer in this timer)
----timer: after:1
----:do: spawn actor bad guy (THEN ONE MORE TIMER IN THE LAST TIMER )
-----timer: after:7
-----:do: spawn actor boss!
Then, for level... hold on... have to catch my breath... OKAY. Then for level 2 do the same thing just make more spawners and timers but make the rule say: if game.Level = 2 :do: 10 spawn actors with the timers above. Then in your boss make a self.integer that will be called self.LIFE... In the boss actor make a rule that says:
Rule
if game.Life =< 0
:do:
change attribute game.Level :to: game.Level + 1
Then make a change attribute that says...
change attribute self.LIFE :to: (game.Level * 2) / 2 or game.Level * 2
The last part about changing the boss' life will help it get harder (I hope)
Okay. This is how I would do it. Hope it works. And even if this doesn't work I hope you get it to work
Someone please tell him if I'm wrong!
Thanks a lot! I will try it out, I really do appreaciate all the affort you put in to this!
Thanks. It took me years to find the right letters and I had to travel through the Caves of Timers to get that many and I had to slay the Beast of Thisisveryhard.
I just hope it works
Thats amazing dude!
but yeah, it looks like it should work, and you explained it well, so again, thank you
You are welcome.