Page MenuHomeFeedback Tracker

taskState will not work in a trigger's condition.
New, WishlistPublic

Description

I was looking for a boolean condition that I could use in order to detect if an objective was completed so that a trigger would activate. So I found the answer from this webpage: http://forums.bistudio.com/showthread.php?137869-Check-if-task-succeeded.
Upon testing that though I noticed taskState doesn't work, and I don't think I'm doing anything wrong with the code. {F25074}

Details

Legacy ID
3279662234
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce

1.) Open the editor.
2.) Spawn a Blufor unit.
3.) Create two triggers
4.) For the first trigger set Activation: Blufor, Once, Present.
Condition: this
5.) For the second trigger set Activation: None, Once, Present.
condition: taskState tskSomeTask == "Succeeded"
On Act: hint "It works!";
6.) Next, create a task using modules.
7.) Create a "create task" module and "set task state" module.
8.) Name the task ID in the create task module: tskSomeTask
9.) Set the task state to "SUCCEEDED". Then Sync up the set task state with the first trigger and the create task module. Also, sync the create task module to the player.
10.) Now preview the mission and walk into the first trigger's radius. The hint will not display meaning the trigger didn't fire.

Additional Information

Here's where I got the code from. It's an old post from 2012.

http://forums.bistudio.com/showthread.php?137869-Check-if-task-succeeded

Event Timeline

AlphaDog edited Steps To Reproduce. (Show Details)Nov 3 2014, 4:38 AM
AlphaDog edited Additional Information. (Show Details)
AlphaDog set Category to Scripting.
AlphaDog set Reproducibility to Always.
AlphaDog set Severity to None.
AlphaDog set Resolution to Open.
AlphaDog set Legacy ID to 3279662234.May 7 2016, 7:44 PM