MD Script question

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

jojorne
Posts: 877
Joined: Sun, 17. Nov 13, 17:25
x4

MD Script question

Post by jojorne »

what this mean:

Code: Select all

<do_if value="$SomeGroup.count" max="3"></do_if>
i dont get that "max" [Maximum number (ignored if exact is set)]

is something like: do if random_number is < 3
jojorne
Posts: 877
Joined: Sun, 17. Nov 13, 17:25
x4

Post by jojorne »

aah!! ignored if exact is set...

Code: Select all

<do_if value="$SomeGroup.count" exact="3"></do_if>
it follows the range attribute

so range start from 0 or 1 to max of 3?

mmm... range of what? rand_number, time, distance...?
Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker »

I'm note sure what you mean with your second post, but I'm going to tell you what each does:

1)

Code: Select all

<do_if value="$SomeGroup.count" max="3"></do_if>
This will check if $SomeGroup.count <= 3.

2)

Code: Select all

<do_if value="$SomeGroup.count" exact="3"></do_if>
This will check if $SomeGroup.count == 3.


Basically, min/max allow you to specify ranges. Personally, I however to prefer writing it like this:

Code: Select all

<do_if value="$SomeGroup.count le 3"></do_if>
le, lt, gt, ge, and == are shortcuts for the corresponding comparator operations.
Last edited by Mad_Joker on Thu, 12. Dec 13, 22:08, edited 1 time in total.
jojorne
Posts: 877
Joined: Sun, 17. Nov 13, 17:25
x4

Post by jojorne »

thank you very much!

Return to “X Rebirth - Scripts and Modding”