Author Topic: ifRandomNumber and onRandomNumber  (Read 456 times)

For example:
OnActivate>Self>ifRandomNumber>[1] [5] [VariableName]
onRandomNumber1>Self>SetItem>Sword
onRandomNumber2>Self>SetItem>Spear
onRandomNumber3>Self>SetItem>Bow
onRandomNumber4>Self>SetItem>Gun
onRandomNumber5>Self>SetItem>Rocket Launcher

It would mainly be used for setting random items, or things like that.

Nevermind. Possible without events.
« Last Edit: August 14, 2009, 10:07:36 AM by deriboy »

Good Idea, But I'm no scripter so bump ;D

ifRandomNumber [1] [12093404]
onRandomNumber1
onRandomNumber2
...
onRandomNumber1395614
onRandomNumber1395615
...
No.

Place a 1x10 plate.
Add the event onActivate->Self->spawnProjectile [0 0 10] [Radio Wave] [0 0 0] [1.000]
Immediately on top of the brick, place ten 1x1f bricks.
Modify their onProjectileHit events. Each one has a 1/10 chance of happening when you click the bottom brick. Use larger or smaller bricks for different chances.
« Last Edit: August 14, 2009, 09:49:11 AM by Space Guy »

ifRandomNumber [1] [12093404]
onRandomNumber1
onRandomNumber2
...
onRandomNumber1395614
onRandomNumber1395615
...
No.

Place a 1x10 plate.
Add the event onActivate->Self->spawnProjectile [0 0 10] [Radio Wave] [0 0 0] [1.000]
Immediately on top of the brick, place ten 1x1f bricks.
Modify their onProjectileHit events. Each one has a 1/10 chance of happening when you click the bottom brick. Use larger or smaller bricks for different chances.
Kinda unefficient but it works.

Yes, but then each one has an INDIVIDUAL chance of spawning a weapon. That means there could be a spear and a rocket launcher. AND I want all of this to happen on just one brick. Also, I was only suggesting 5 or 6 onRandomNumber events.

No - spawn one projectile. It will hit one of the bricks.

If you want customised events to do every little tiny thing for you, learn to script. This is already possible and needs nothing new.

Wont it also be possible then for 2 setItem messages to be sent to one brick? what will happen then?

Wont it also be possible then for 2 setItem messages to be sent to one brick? what will happen then?
No - spawn one projectile. It will hit one of the bricks.

AAAAHHH...... I get it. Thanks for being (semi)-Patient with me! I diddnt understand at first about the 1x10 and crap.