Author Topic: spawnItem random direction  (Read 700 times)

Why we have this ?



And not this ?



Exemple : Spawn tool/weapon with randomely assigned direction in a squared arena  :cookieMonster:
« Last Edit: August 17, 2015, 04:39:30 PM by Rammboy »

You can do this with VCE Variables.

0 onActivate > Self > setItem > Rocket L.
1 onActivate > Self > VCEmodVariable > r > Set > 1
2 onActivate > Self > VCEmodVariable > r > Random > 4
3 onActivate > Self > VCEifVariable > r == 1 > 3 4
4 onVariableTrue > Self > setItemDirection > North
5 onActivate > Self > VCEifVariable > r == 2 > 5 6
6 onVariableTrue > Self > setItemDirection > East
7 onActivate > Self > VCEifVariable > r == 3 > 7 8
8 onVariableTrue > Self > setItemDirection > South
9 onActivate > Self > VCEifVariable > r == 4 > 9 10
10 onVariableTrue > Self > setItemDirection > West

For this, you need Event_Variables.


You can do this with VCE Variables.

0 onActivate > Self > setItem > Rocket L.
1 onActivate > Self > VCEmodVariable > r > Set > 1
2 onActivate > Self > VCEmodVariable > r > Random > 4
3 onActivate > Self > VCEifVariable > r == 1 > 3 4
4 onVariableTrue > Self > setItemDirection > North
5 onActivate > Self > VCEifVariable > r == 2 > 5 6
6 onVariableTrue > Self > setItemDirection > East
7 onActivate > Self > VCEifVariable > r == 3 > 7 8
8 onVariableTrue > Self > setItemDirection > South
9 onActivate > Self > VCEifVariable > r == 4 > 9 10
10 onVariableTrue > Self > setItemDirection > West

For this, you need Event_Variables.


not setitem, spawnitem

it chucks out an item instead of setting the brick's item
which is some cases is way cooler