Jump to content
Sign in to follow this  
ArmaMan360

Error in detecting all dead enemy units

Recommended Posts

Ok so its been about 3-4 days with this problem and finally had to register with bisforums for the solution. And I want to give my laptop a brief time before I smash it against the wall. lol

 

I got sidefinder.sqf (finding next side mission) and separate side1, side2.sqf files in my random objectives mission and using EOS to spawn units. Which is working smooth. It starts the mission, shk_taskmaster allots me a random objective from among 2 test missions "side1.sqf" and "side2.sqf".

 

Problem lies in the "Detect objective clear line".

 

Previously for testing purposes I was using the following

waitUntil {{alive _x; side _x == west} count allunits == 0;};

which was working very well if I killed a unit spawned with bis_fnc_spawngroup and would immediately shoot the task complete notification.

But now when I have replaced the spawn line with EOS:

if (true) then {
_nul = [["side_area"],[0,0],[1,1,100],[0,0],[0],[0],[0,0],[1,0,100,WEST]] call EOS_Spawn;}:

It throws a generic error in expression in the above mentioned waituntil line around alive _x. This mission is a purely SP game. Only one OPFOR playable unit which is mine.
what could be causing it? It is basically a clear area objective where I need it to complete the objective when all EOS spawned units are killed.

 

Any help would be appreciated and the community here is amazing  :D

Share this post


Link to post
Share on other sites

Could you take a screenshot of the error and post it here?

Share this post


Link to post
Share on other sites

side1.sqf - you should replace this :

waitUntil {{alive _x} count {_nul =0;}};

by this:

waitUntil {({alive _x} count _nul) isEqualTo 0};

But I'm not sure what _nul is supposed to return : you could check it with:

hint str(_nul);

and copy/paste in text with:

copytoClipBoard str(_nul);

I would also advice using something else than _nul for your variable, it's just a naming convention, but you usually use _nul when you don't need anything returned.

Share this post


Link to post
Share on other sites

Wow that worked.. Love you man.

 

Ok so this is what I did. I removed the "_nul" from the EOS call, like so:

[["side_area"],[0,0],[1,1,100],[0,0],[0],[0],[0,0],[1,0,100,WEST]] call EOS_Spawn;}:

and let the waituntil remain like this

waitUntil {{alive _x; side _x == west} count allunits == 0;};

Haleks thank you again man. ^^ 

Share this post


Link to post
Share on other sites

You're welcome!

One last thing :

waitUntil {{alive _x; side _x == west} count allunits == 0;};
I believe this should be written like so:

waitUntil {{alive _x && side _x == west} count allunits == 0;};

Share this post


Link to post
Share on other sites

Thank youuu for the added hint... haleks, Ravage is really a dream come true. Great zombies in arma 3. ^^

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  

×