Jump to content
Sign in to follow this  
infiltrator_2k

Biki's Scripting Commands?

Recommended Posts

I'm a little confused about what scripting commands to use and where to find them on Biki. I mean, I want to delete some vehicles and the crew on my mission and I Goggled this from an Armaholic's Arma 2 OA forum:

{deleteUnit _x} forEach (unit fx1); deleteUnit fx1; {deleteUnit _x} forEach (unit fx2);

Then I read to delete a vehicle you have to delete the crew first i.e.

{deleteVehicle _x;}forEach crew heli;deleteVehicle heli;

However, when I've gone to Biki I cannot find this 'deleteVehicle_x' command :/ More to the point, what commands do I use? Are Arma 1 and Arma 2 commands good to use with Arma 3? Is >>THIS<< a comprehensive list of all the commands from all the series? if so what happened to the deleteUnit_x command? Is it that BIS sometimes remove commands in order to replace them with more efficient ones?

Edited by Infiltrator_2K

Share this post


Link to post
Share on other sites

https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3

is the Arma 3 list. Arma 2 commands came over, but there are some new systems with new logic. The old commands are kept though. (eg. see the mess at weather changes)

And yes, you need to delete crew first with deleteVehicle. I've been using this command since forever (Arma 2) I don't even remember deleteUnit.

{
   moveOut _x;
   deleteVehicle _x;
}foreach (crew _vehicle);

deleteVehicle _vehicle;

Edited by zapat

Share this post


Link to post
Share on other sites

It's not deletevehicle_x but just deletevehicle.

The _x is just a placeholder for the ForEach loop, which will cycle through all the indexes of an array. This array in your case is

crew vehiclename + [vehiclename] which is the same as -> [driver vehiclename,gunner vehiclename,vehiclename] for example.

so:

{deleteVehicle _x} forEach crew vehicleName + [vehicleName];

if the vehicle has a driver and a gunner ie, the above is the same as:

deletevehicle (driver vehiclename);
deletevehicle (gunner vehiclename);
deletevehicle vehiclename;

just way shorter, especially the bigger the crew is.

Here's some further reading on arrays.

Share this post


Link to post
Share on other sites
https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3

is the Arma 3 list. Arma 2 commands came over, but there are some new systems with new logic. The old commands are kept though. (eg. see the mess at weather changes)

And yes, you need to delete crew first with deleteVehicle. I've been using this command since forever (Arma 2) I don't even remember deleteUnit.

{
   moveOut _x;
   deleteVehicle _x;
}foreach (crew _vehicle);

deleteVehicle _vehicle;

So basically all the commands in the Arma 3 commands list will do everything that the commands in Arma 2's list will do, and old Arma 2 commands are now considered surplus/obsolete (albeit still valid) as their actions can be accomplished with the new commands that came with Arma 3?

It's not deletevehicle_x but just deletevehicle.

The _x is just a placeholder for the ForEach loop, which will cycle through all the indexes of an array. This array in your case is

crew vehiclename + [vehiclename] which is the same as -> [driver vehiclename,gunner vehiclename,vehiclename] for example.

so:

{deleteVehicle _x} forEach crew vehicleName + [vehicleName];

if the vehicle has a driver and a gunner ie, the above is the same as:

deletevehicle (driver vehiclename);
deletevehicle (gunner vehiclename);
deletevehicle vehiclename;

just way shorter, especially the bigger the crew is.

Here's some further reading on arrays.

Gotcha! Thanks for explaining that ;) Already I can hear Iceman77 screaming "read Mr. Murray's bloody guide!" LoL... I am going to look beyond its age I promise ;)

Share this post


Link to post
Share on other sites

If you're using zapat's list, make sure to read the description of the commands carefully. That list includes all commands from OFP to ArmA3. Most, if not all, OFP commands are obsolote from A2 onwards.

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  

×