Jump to content
Sign in to follow this  
igneous01

objective to reveal enemy position, knowsabout to complete task

Recommended Posts

having some problems getting this to work.

basically i have in the init.sqf

aacounter = 0 // this will count how many aa sites spotted in order for the task to be completed

SeeAA1 = false // player does not see or knowabout the AA vehicle

SeeAA2 = false

now i have another script called spotcheck, and it goes as follows:

while {alive sniper} do

{

_ska1 = sniper knowsAbout AA1

_ska2 = sniper knowsAbout AA2

if (_ska1 >= 1) then {SeeAA1 = true};

if (_ska2 >= 1) then {SeeAA2 = true};

sleep 2

}

then i have 2 triggers that check for the variables SeeAA1 and SeeAA2 to be true, afterwards i have a little taskhint that shows up saying "aa site located", in the act field of each trigger

taskhint ........... // not relevent since it works

aacount = aacount + 1

then another trigger checks to see if aacount => 2

this will make the obj to settaskstate to succeeded

but for some reason when i teleport to the AA1 vehicle and reveal it, nothing happens, i dont get the taskhint showing, and im not sure if its the script or the triggers

can anyone help me out?

Share this post


Link to post
Share on other sites

bumped

im completely stuck now, i checked my rpt file and saw there were errors in coding (forgot to break lines of commands since its sqf - silly me)

now i ran it again, still no result nor hint displaying the task was completed

checkd my rpt and no errors came up when running it.

so can you even use knowsabout to trigger whether an objective completes?

Share this post


Link to post
Share on other sites
_knowsaboutTargets.utes.rar

That's a MP proof version. If you are making a SP mission, it can be made even simpler.

dam... and here i thought id have to write a complicated script just to make this work.

thank you so much for making this, triggers ftw

also wanted to ask, but how did u get the condition line of the trigger to accept AND/OR? i can never get it working for me for some reason....

Share this post


Link to post
Share on other sites
also wanted to ask, but how did u get the condition line of the trigger to accept AND/OR? i can never get it working for me for some reason....

Maybe you have this problem?

Share this post


Link to post
Share on other sites
Maybe you have this problem?

ahhhhhhh now i understand. was wondering why i could never get operators to work with trigger conditions.

so if a variable has no value, and your doing operator check between two variables, then the condition will never fire?

thanks for the explanation, i understand much more now ^^

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  

×