Jump to content
Sign in to follow this  
Arched

Objective as Trigger Condition

Recommended Posts

Hey guys, I've been scripting for about a few months now, and, I've created some nice missions myself... My missions often include respawns, objectives, tasks etc. But theres a single line of code I just cant get right :mad:, its really stupid, so Im just gonna ask. I have a mission that I have to clear up a city of zombies and enemy soldiers, so I made two triggers, each one representing the not-presence of OPFOR and Independents(zombies). So they are set to Not Present as condition each. Here are the On Act. codes for each one:

"Zombies" objStatus "DONE"; hint "All zombies are dead again"; 

"Soldiers" objStatus "DONE"; hint "All soldiers have been killed";

In third trigger, I have this as condition:

obj_Zombies && obj_Soldiers;

And this as Act.

"KillEverything" objStatus "DONE"; tskobj_KillEverything setTaskState "SUCCEEDED"; player setCurrentTask tskobj_SUV; SUV lock false;

The thing is, when both objectives are completed, the task doesnt succeed. So Im thinking its a condition problem on the third trigger. I tried removing zombies or soldiers, and setting the Third trigger to do everything(making the condition the not-presence of OPFOR/Independent) and it works perfectly. So could anyone help me here, I know this is a dumb mistake, but IDK whats wrong =s :confused::confused:

BTW here is the Briefing.sqf file codes

//Objective 3

tskobj_extract = player createSimpleTask ["extract."];
tskobj_extract setSimpleTaskDescription ["When done, await for the chopper extract you.","GET TO THA CHOPPA.","GET TO THA CHOPPA."];
tskobj_extract setSimpleTaskDestination (getmarkerpos "extract");


//Objective 2

tskobj_SUV = player createSimpleTask ["Get in SUV."];
tskobj_SUV setSimpleTaskDescription ["When done, get in the SUV.","GET IN SUV.","GET IN SUV."];
tskobj_SUV setSimpleTaskDestination (getmarkerpos "getin");



//Objective 1

tskobj_KillEverything = player createSimpleTask ["KillEverything"];
tskobj_KillEverything setSimpleTaskDescription ["Kill everything that moves.","Eliminate all hostiles.","Eliminate all hostiles"];
tskobj_KillEverything setSimpleTaskDestination (getmarkerpos "here");

Share this post


Link to post
Share on other sites

The third trigger is checking for variables that are not set in the on activation fields of the first two.

"Zombies" objStatus "DONE"; hint "All zombies are dead again";

Try instead:

obj_Zombies = true; publicVariable "obj_Zombies"; "Zombies" objStatus "DONE"; hint "All zombies are dead again";

The same goes for the second objective.

"Soldiers" objStatus "DONE"; hint "All soldiers have been killed";

Try instead:

obj_Soldiers = true; publicVariable "obj_Soldiers"; "Soldiers" objStatus "DONE"; hint "All soldiers have been killed";

Regards,

Sander

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  

×