| Blockland Forums > Suggestions & Requests |
| ifRandomNumber and onRandomNumber |
| (1/2) > >> |
| Deriboy:
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. |
| Atomshock:
Good Idea, But I'm no scripter so bump ;D |
| 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. |
| AlphaicX:
--- Quote from: Space Guy on August 14, 2009, 09:47:22 AM ---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. --- End quote --- Kinda unefficient but it works. |
| Deriboy:
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. |
| Navigation |
| Message Index |
| Next page |