Jump to content
Sign in to follow this  
Khalashnikovf

Why is this not working?

Recommended Posts

Hello, I have one newb issue with this little script:

This little script should control number of EAST Soldiers in area "VycistenyDul".

And by that number should made some things.

Total number of soldiers in that area is 13 before arriving of Target and 16 after arriving of Target.

Script controls if count is less then 16 what activating Alarm Script and cancel calling this IF again.

IF count is less than 13 it is activating alarm too and canceling calling IF again (its because of before targets arrive into area).

Next IF should Controls number less than 6 for Make Target Flee (target just have wapoint waiting for TargetNoFlee = False)

And last IF is for Capturing Target if number of soldiers is under 3.

OR three specify soldiers (his bodygourds) are dead.

But ... there is something bad and its not working... help me pls.

(there are lot of comments for making me sure its working properly).

TargetNoFlee = True;

TargetNoCapture = True;

AlarmNespusten=True;

while { not(cistyDul) } do {

hint format ["Count: %1", east countSide list VycistenyDul ];

if ( (east countSide list VycistenyDul < 16)and(AlarmNespusten)) then {

titleText ["ALARM 15 !","PLAIN",5];

[] execVM "alarm.sqf";

AlarmNespusten=False;

} else {

titleText ["15 NO ","PLAIN DOWN",1];

sleep 1.5;

};

if ( (east countSide list VycistenyDul < 13)and(AlarmNespusten)) then {

titleText ["ALARM 12!","PLAIN",5];

[] execVM "alarm.sqf";

AlarmNespusten = False;

} else {

titleText [" 12 NO ","PLAIN DOWN",1];

sleep 1.5;

};

if ( (east countSide list VycistenyDul < 6)and(TargetNoFlee)) then {

titleText ["Less 6, Target Flees!","PLAIN",5];

TargetNoFlee=False;

} else {

titleText [" FLEE NO ","PLAIN DOWN",1];

sleep 1.5;

if ( (east countSide list VycistenyDul < 3)and(TargetNoCapture) ) then {

titleText ["Almost All Dead, Target Captured!","PLAIN",5];

[] execVM "capture.sqf";

TargetNoCapture = False;

} else {

titleText [" CAPTURE NO","PLAIN DOWN",1];

sleep 1.5;

};

if ( ( not(alive Sol1))and(not(alive Sol2))and(not(alive Sol3)) ) then {

titleText ["3 Dead, Target Captured!","PLAIN",5];

[] execVM "capture.sqf";

TargetNoCapture=False;

} else {

titleText ["CAPTURE NO ","PLAIN DOWN"];

};

sleep 1.5;

};

There is also one weird thing: My alarm script making something what I dont want, its launch all order at once even if there is some sleep pause.

flare = "F_40mm_Red" createVehicle [(position alarmista1 select 0), (position alarmista1 select 1), 100];

sleep 60;

flare = "F_40mm_Yellow" createVehicle [(position alarmista2 select 0), (position alarmista2 select 1), 150];

Thanks for respond .. Im desperate :(

Share this post


Link to post
Share on other sites

Why are you scripting all of that when it looks like it can be done via Triggers?

Share this post


Link to post
Share on other sites
Why are you scripting all of that when it looks like it can be done via Triggers?

Bacuse I have no idea how to make dynamic waypoint in editor, dont know how to make flare, capturing target,etc ... :(

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  

×