Jump to content
SUPPA HOT FIYA

Deleting a large group of individual units

Recommended Posts

Hi guys,

 

I'm making ravage scenario which begins with an action packed, panicky introduction, followed by a helicopter extraction to actually start the scenario. Everything else is already finished, so this is the last challenge I'm facing and I don't know what to do. I've created a lot of units for this introduction (civilian/zombie and NATO), but I want them all gone or dead (they get cleaned up automatically really fast) once the player leaves the boundaries of a trigger. This is solely for performance purposes. I have named each individual zombie, civilian and NATO unit and tried the following:

 

[z1, z2, z3, z4, z5, z6, z7, z8, z9, z11, z12, z13, z14, z15, z16, z17, z18, z19, z20, z21, z22, z23, z24, z25, z26, z27, z28, z29, z30, z31, z32, z33, z34, z35, z36, z37, z38, z39, z40, z41, z42, z43, z44, z45, z46, z47, z48, z49, z50, z51, z52, z53, z54, z55, z56, z57, z58, z59, z60, z61, z62, z63, z64, z65, z66, z67, z68, z69, z70, z71, z72, z73, z74, z75, z76, z79, z80, z81] setdamage 1

 

but this didn't work (generic expression error). the unit list should be 100% correct, I have checked it three times now (the missing units like z10 and z77/z88 are meant to be missing). What am I doing wrong?

Share this post


Link to post
Share on other sites
_units = [z1, z2, z3, z4, z5, z6, z7, z8, z9, z11, z12, z13, z14, z15, z16, z17, z18, z19, z20, z21, z22, z23, z24, z25, z26, z27, z28, z29, z30, z31, z32, z33, z34, z35, z36, z37, z38, z39, z40, z41, z42, z43, z44, z45, z46, z47, z48, z49, z50, z51, z52, z53, z54, z55, z56, z57, z58, z59, z60, z61, z62, z63, z64, z65, z66, z67, z68, z69, z70, z71, z72, z73, z74, z75, z76, z79, z80, z81];

{
 _x setdamage 1;
 true
} count _units;

using correct syntax of setDamage helps... Therefore we have that wiki.

  • Like 3

Share this post


Link to post
Share on other sites

Beat me to it, sarogah ;_;

  • Like 2

Share this post


Link to post
Share on other sites
29 minutes ago, sarogahtyp said:

_units = [z1, z2, z3, z4, z5, z6, z7, z8, z9, z11, z12, z13, z14, z15, z16, z17, z18, z19, z20, z21, z22, z23, z24, z25, z26, z27, z28, z29, z30, z31, z32, z33, z34, z35, z36, z37, z38, z39, z40, z41, z42, z43, z44, z45, z46, z47, z48, z49, z50, z51, z52, z53, z54, z55, z56, z57, z58, z59, z60, z61, z62, z63, z64, z65, z66, z67, z68, z69, z70, z71, z72, z73, z74, z75, z76, z79, z80, z81];

{
 _x setdamage 1;
 true
} count _units;

using correct syntax of setDamage helps... Therefore we have that wiki.

1

thank you, that did the trick!

Share this post


Link to post
Share on other sites

Add this to spice things up a bit:


{
_x setdir random 360;
_x setvelocityModelspace [random 5,random 5,10];
 _x setdamage 1;
 true
} count _units;

Cheers

  • Like 3

Share this post


Link to post
Share on other sites

@Midnighters I am unsure of your intentions, but as of now all I've seen from you if off-putting and insulting.

This goes from discouraging people from staying active in the editing/scripting part of this game to issuing comments far off the topic present in a thread.

I do not wish any further interactions with you from this point, and this is the nice way of putting things.

If you are unwilling to help people because of your "pitiable" past, leave it off this board and for yourself, instead of shedding a bad light on the entirety of the Arma 3 community.

Thank you.

Share this post


Link to post
Share on other sites
5 hours ago, sarogahtyp said:

_units = [z1, z2, z3, z4, z5, z6, z7, z8, z9, z11, z12, z13, z14, z15, z16, z17, z18, z19, z20, z21, z22, z23, z24, z25, z26, z27, z28, z29, z30, z31, z32, z33, z34, z35, z36, z37, z38, z39, z40, z41, z42, z43, z44, z45, z46, z47, z48, z49, z50, z51, z52, z53, z54, z55, z56, z57, z58, z59, z60, z61, z62, z63, z64, z65, z66, z67, z68, z69, z70, z71, z72, z73, z74, z75, z76, z79, z80, z81];

{
 _x setdamage 1;
 true
} count _units;

using correct syntax of setDamage helps... Therefore we have that wiki.

Hi sarogahtyp, just a question: true in loop? what for?

Share this post


Link to post
Share on other sites

Count works for boolean or nothing returned. So, you can remove the true here, as setDamage returns nothing.

  • Like 1

Share this post


Link to post
Share on other sites

I do believe that it's more of a security thing, I do it this way myself as well. "Just to make sure"

Share this post


Link to post
Share on other sites

Midnighters, thanks for your help with the arsenal :)

  • Like 1

Share this post


Link to post
Share on other sites
I do believe that it's more of a security thing, I do it this way myself as well. "Just to make sure"

Yes this is the reason why I put that true in it. Sometimes u use commands in the count which returning anything and maybe u r not aware about it. In this case u get weird behaviour or errors. The true is there because I won't think about that everytime and so it prevents bug fighting.
Just a security thing as u stated...

sent from mobile using Tapatalk

  • Like 1

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

×