Jump to content
Sign in to follow this  
Cold Evil

Trigger State and Trigger Condition

Recommended Posts

I've done this before but... I forgot how and have lost the mission containing the code...

I want a trigger to set when activated "set MyTask = 1"

Then i want a trigger with the condition to be "MyTask == 1"

How do i write this.

Also will this be local of global?

Share this post


Link to post
Share on other sites

If I'm reading your intentions correctly, you stated what it was.

Trigger One:

OnAct: MyTask = 1

Trigger Two:

Cond: MyTask == 1

No "set" involved. MyTask would be global... I think. I suck at locality. About to make a post about it :P

Share this post


Link to post
Share on other sites

lol...

Thanx allot!

Here is the trigger i ended up with:

OnAct: MyTask = 1

Cond: count thislist > 0 && MyTask == 1

Share this post


Link to post
Share on other sites
lol...

Thanx allot!

Here is the trigger i ended up with:

OnAct: MyTask = 1

Cond: count thislist > 0 && MyTask == 1

They need to be separate triggers, or MyTask needs to = 1 in an init, or else it'll never activate because MyTask will remain undefined.

Share this post


Link to post
Share on other sites

In addition this will be global, in case you still need to know. In general, everything without an underscore beforehand is global, and since you can't use local variables in triggers it'll be global.

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  

×