How do I do Iftrinkets?

Started by Lollipop, July 12, 2014, 06:14:59 PM

Previous topic - Next topic

Lollipop

I know it's really dumb, but I can't do the if trinkets in the script. Could someone give an
Explanation and an example?

Dav999

In iftrinkets(a,b), the first argument (a) means the amount of trinkets you need to have collected for the specified script (b) to run.

An example of its use:
iftrinkets(2,cutscene) would run the script called "cutscene" if you have 2 or more trinkets.

Code (script1) Select
say(2)
I will now check if you
you have 3 or more trinkets.

iftrinkets(3,script2)

say(1)
You have less than 3 trinkets.


Code (script2) Select
say(1)
You have 3 or more trinkets!

destroy(gravitylines)

Lollipop

Quote from: Dav999 on July 12, 2014, 07:01:20 PM
In iftrinkets(a,b), the first argument (a) means the amount of trinkets you need to have collected for the specified script (b) to run.

An example of its use:
iftrinkets(2,cutscene) would run the script called "cutscene" if you have 2 or more trinkets.

Code (script1) Select
say(2)
I will now check if you
you have 3 or more trinkets.

iftrinkets(3,script2)

say(1)
You have less than 3 trinkets.


Code (script2) Select
say(1)
You have 3 or more trinkets!

destroy(gravitylines)


Thanks!