Author Topic: One button controls multiple vehicle spawners  (Read 841 times)

 I've spent the last few days trying to figure out how to make a brick activate vehiclespawners in succession depending on whether the bots on them are already spawned. I tried delays to no avail. Basically, this:

[Button]

[in1] [in2] [in3]

The button would activate in1 and spawn the bot, but not in1 or in3. After pressing the button once, pressing again would activate in2, and so forth. I'm a n00b at eventing and I really don't want to waste my summer days away contemplating how the **** to make this work.

Thanks.

This isnt completely cler but ill take a shot.
-If your wanting to spawn all of them simultaneously than you need all the spawns to be named the same thing.
-If you are are trying to make them spawn at intervals set the names different from each other and add delays to the spawn.

I hope this helps. If not please provide some more information.

 Basically I want the button onactivate to spawn in1. After spawning in1, the second activate will spawn in2, and so on.

Toggle event enabled I would think.


Delays would work.
He want's it where you press a button and it spawns something. Then you press it again and it spawns something else. You can't do that with delays.

He want's it where you press a button and it spawns something. Then you press it again and it spawns something else. You can't do that with delays.
unless you're very good at guessing when the next click will be

just thought of, you could use VCE instead of toggles, or shifteventenabled
although toggles are rather simple to use for this

 Alright, but how do I get toggleeventenabled to work only on the second one?

Actually, come to think of it, this button will have to tamper with up to 50 different bricks, so is the toggle event feasible for this?

Secondly, is it possible to make bots drive vehicles? I've heard of people doing it, but for the life of me all my bots just overshoot the brick I tell them to move to and crash.


Use VCE to check for an if variable on the button. Name this variable "spawnvar" or somthing easy to remember.

If self spawnvar = 1
false -> named brick -> n1 -> set vehicle none
false -> self -> set var -> "spawnvar" 1
true -> named brick -> n1 -> set vehicle bot
 1 true -> self -> spawn var -> set 2             --*1 delay the variable set by 1 milisecond.
true -> self -> if spawn var = 2
                                   
true -> named brick ->n1 -> setvehicle none
true -> named brick -> n2 -> setvehicle bot
1  true -> self -> spawnvar -> set 3

basically use that kind of pattern or similar.
you can also use toggle event enabled.