![]() |
|
|
|||||||
| ArmA 2 & OA - MISSION EDITING & SCRIPTING For discussing the technical aspects of creating custom ArmA 2 & the standalone expansion Operation Arrowhead missions as well as scripting. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Sergeant
Join Date: Feb 2010
Posts: 122
|
remove item from array
because this is a lil over my head on scripting i pulled this from domination
"thanks xeno" // remove an item at index position in an ArrayList // parameters: array var as string, index // example ["_myArrayList1",_index] call XfArrayListRemoveAt; XfArrayListRemoveAt = { private ["_ar","_index"]; _ar = _this select 0;_index = _this select 1; call compile format [" %1 set [_index, ""YXZ_DEL_Q_X76""]; %1 = %1 - [""YXZ_DEL_Q_X76""]; ", _ar]; }; but this doesnt do what i need it to do.. i need to remove a specific item from an array list no matter what the index pos of the array list is because the array list is gonna change more then once. so example _myarraylist = ["array1","array2",etc]; if whatever happened during mission remove "array2" so i can recall.. thanks in advance if anyone can help me here.. |
|
|
|
|
|
#2 | |
|
Sergeant Major
Join Date: Jan 2005
Location: France
Posts: 1,713
|
Quote:
|
|
|
|
|
|
|
#3 |
|
Sergeant
Join Date: Feb 2010
Posts: 122
|
i spent the whole day making sure it wasnt something simple lol.
thanks ill go try it
|
|
|
|
|
|
#4 |
|
Sergeant Major
Join Date: Aug 2006
Location: Germany ( Lake Constance )
Posts: 1,460
|
Check this out: Wiki: Array
__________________
Group Link 4 Special FX Edition v.1.1.87 ( Full ) Group Link 4 Special FX Edition Mission Based Initialize. Any questions? Feel free to get in contact with me: Skype: SNKMAN All the greate things of the world only happend becouse someone is doing more then he has to do. ( Hermann Gmeiner ) |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|