Author Topic: Random item?  (Read 823 times)

I was wondering, since I'm all that great with events, if there is anyway to make a brick set a random item out of a selected group of items.

What I'm trying to do is make a brick have Bushido's 3 LMGs. The regular one is on the brick, then when it is picked up (onItemPickup event) it disappears for 30 seconds and reappears. What I'm trying to do is make the LMG that appears again a random selecting of the LMG, Blocky LMG and Drum LMG.

You could always make it on a cycle.

Code: [Select]
onItemPickup>self>setItem[None]
[30000]onItemPickup>self>setItem[item 2]
onItemPickup>self>setItem[None]
[30000]onItemPickup>self>setItem[item 3]
onItemPickup>self>setItem[None]
[30000]onItemPickup>self>setItem[item 1]

If I thought correctly that should make it so when someone picks up that item it will switch to none then after 30 seconds it will spawn a different item. And it will keep doing so but it cycles through different items each time. I haven't tested it in blockland but you could try using those events.