Jump to content
BlacKnightBK

I do not understand "setTriggerStatements" command

Recommended Posts

Hello everyone,

I have nearly reached the end of my first mission. I was a bit stuck on how to set the winning conditions for a mission so i decided to look at a similar mission file and i found this command with the triggers.

My question is how do i use it, i read the commands description here and I cannot understand it.

 

Share this post


Link to post
Share on other sites

Have you tried placing trigger in editor? Have you seen condition, activation and deactivation input boxes on trigger template? This is the scripted way of filling those boxes.

Share this post


Link to post
Share on other sites

params:

  1. True or false, (for example "alive player"), also a list of what "this" can be used in the string (this, thisTrigger, thisList)
  2. Executed if the trigger is enabled (and param 1 is true), also a list of what "this" can be used in the string (thisTriggerthisList)
  3. Executed if the trigger is disabled (and param 1 is false), also a list of what "this" can be used in the string (thisTrigger)

example?: (for when the player is in the trigger radius)

_trigger setTriggerStatements ["alive player", "isAliveInTrigger = true;", "isAliveInTrigger = false;"]; 

Rough example, but do you get it?

  • Like 2

Share this post


Link to post
Share on other sites
26 minutes ago, stokesgamingmc said:

params:

  1. True or false, (for example "alive player"), also a list of what "this" can be used in the string (this, thisTrigger, thisList)
  2. Executed if the trigger is enabled (and param 1 is true), also a list of what "this" can be used in the string (thisTriggerthisList)
  3. Executed if the trigger is disabled (and param 1 is false), also a list of what "this" can be used in the string (thisTrigger)

example?: (for when the player is in the trigger radius)


_trigger setTriggerStatements ["alive player", "isAliveInTrigger = true;", "isAliveInTrigger = false;"]; 

Rough example, but do you get it?

Thanks, that was the best explanation bro

Share this post


Link to post
Share on other sites
1 hour ago, stokesgamingmc said:

params:

  1. True or false, (for example "alive player"), also a list of what "this" can be used in the string (this, thisTrigger, thisList)
  2. Executed if the trigger is enabled (and param 1 is true), also a list of what "this" can be used in the string (thisTriggerthisList)
  3. Executed if the trigger is disabled (and param 1 is false), also a list of what "this" can be used in the string (thisTrigger)

example?: (for when the player is in the trigger radius)


_trigger setTriggerStatements ["alive player", "isAliveInTrigger = true;", "isAliveInTrigger = false;"]; 

Rough example, but do you get it?

Thanks, that was the best explanation bro

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

×