![]() |
Random
What is the Random script?
|
random(mininumvalue,highestvalue)
|
I dont understand sir!
|
Like this:
if (weaponfired) {this.result=random(1,100) if (this.result<=20) { message Uh oh it was less than or equal to 20; } else if (this.result<=50) { Oh thank god it was higher than or equal to 50; } I just did that off the top of my head but its the basic idea. |
Quote:
else if (this.result>=50) { |
woops I just did that off the top of my head.
|
What is this the war of the > and the < ?!
|
Quote:
|
......................
rmemeber to use int(var); to round the variable, if you don't you could have some kind of wierd garbly goop for a script. Hope you don't ever become a big scripter though Poogle, cause frankly, neopets sucks the big one
|
Re: ......................
Quote:
yeah depends what kind you need like sprite random then u need int so you dont have decimals and junk . but if your doing something like this.check=random(0,100); if (this.check<10) { lay goldrupee; } or whatever then you dont |
ap=random(0,100) would make the ap bar mad becuase it would wind up with
ap=42.45684574562341256 |
Quote:
(And yes 101, integers always round down) |
| All times are GMT +2. The time now is 02:17 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.