Jump to content
Sign in to follow this  
cod0

How to make a task that can count?

Recommended Posts

Like the "Find Evidence"...

Share this post


Link to post
Share on other sites

Use a global numeric variable, increase its value for every evidence found, and use a trigger with condition

var == 3

Share this post


Link to post
Share on other sites

Instead of doing task settaskstate "SUCCEEDED" when the item is picked up do what Enigma told you.

First make a variable in the init say _evidence = 0;

In the trigger for when the item is picked up, do a _evidence = _evidence + 1;

and then when say _evidence == 3

You'd use the settaskstate! :)

Share this post


Link to post
Share on other sites
Instead of doing task settaskstate "SUCCEEDED" when the item is picked up do what Enigma told you.

First make a variable in the init say _evidence = 0;

In the trigger for when the item is picked up, do a _evidence = _evidence + 1;

and then when say _evidence == 3

You'd use the settaskstate! :)

Oh! Thank you!

Share this post


Link to post
Share on other sites

Use gloval variable, without underscore: evidences==3

(local variable _evidences won't work in trigger condition)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×