<RetVar/IF> = random value from <Var/Number> to <Var/Number> -1

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

Locked
mark_a_condren
Posts: 1385
Joined: Wed, 3. Aug 05, 05:05
x3tc

<RetVar/IF> = random value from <Var/Number> to <Var/Number> -1

Post by mark_a_condren » Tue, 7. Sep 10, 19:10

[skip|else] if [not]|while [not]| <RetVar/IF> = random value from <Var/Number> to <Var/Number> - 1


[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = The Variable returned by the random number generation.
<Var/Number> = The first one is the minimum number and the second the maximum number that you want generated as a random number, the maximum number will have 1 removed from it.

Returns a random number in the range of <Var/Number> to <Var/Number> minus one.


Example:

$rand.num = random value from 100 to 200 -1

$rand.num will be between 100 and 199.


Command Location:

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 21978
Joined: Sun, 2. Apr 06, 16:38
x4

[TiP][49] 286397

Post by X2-Illuminatus » Fri, 17. Sep 10, 14:32

[skip|else] if [not]|while [not]| <RetVar/IF> = random value from <Var/Number> to <Var/Number> - 1


[skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Die Variable, die bei der Erzeugung der zufälligen Zahl zurückgegeben wird.
<Var/Number> = Die erste ist die kleinste Zahl und die zweite die größte, die bei der Erzeugung der zufälligen Zahl genutzt wird. Die größte Zahl wird um 1 reduziert.

Gibt eine Zahl im Bereich von <Var/Number> bis <Var/Number> minus eins zurück.


Beispiel:

$rand.num = random value from 100 to 200 -1

$rand.num wird zwischen 100 und 199 sein.


Zu finden unter:
Last edited by X2-Illuminatus on Wed, 24. Nov 10, 21:31, edited 1 time in total.

User avatar
Capux
Posts: 2141
Joined: Sat, 31. Oct 09, 22:17
x4

[TiP] [34] 286397

Post by Capux » Thu, 23. Sep 10, 20:17

[skip|else] if [not]|while [not]| <RetVar/IF> = random value from <Var/Number> to <Var/Number> - 1

[skip|else] if [not]|while [not]| = Le possibili istruzioni o cicli condizionali che possono essere usati con questo comando.
<RetVar/IF> = La variabile restituita dal generatore casuale di numeri.
<Var/Number> = Il primo è il numero minimo che potrà essere generato, il secondo il massimo. Ricorda che il massimo sarà sempre ridotto di uno (ed è un valore intero).

Restituisce un numero casuale compreso tra <Var/Number> e <Var/Number> meno uno.

Esempio:

$rand.num = random value from 100 to 200 -1

$rand.num sarà compreso tra 100 e 199.


Posizione dell'istruzione nella lista:

Locked

Return to “MSCI Reference”