OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: CopyrightPhilly on 13 May 2005, 04:23:30
-
hey chaps,
_weapon1 is a weaponholder that is made in the same script...
but when using the following loop
#loop
clearMagazineCargo _weapon1
clearWeaponCargo _weapon1
_weapon1 addweaponcargo ["m16",1]
_weapon1 addmagazinecargo ["m16",10]
~5
goto "loop"
it dose not add the weapons...
any ideas why?
i have tryed it without the to clear lines and it works but that means having more then 1 gun...
-
Maybe i'm missing something here but maybe remove the-
clearMagazineCargo _weapon1
clearWeaponCargo _weapon1 lines
from da loop, else the weaponCargo is removed every time the loop loops ::)
-
well the prupose of the loop is incase the user takes a weapon, i dont want it to have god knows how many m16's. just 1 at any 1 time....
so what i want it to do:
remove all the weapons/magazines
add 10 magazines and 1 gun
wait 5 seconds and do it again.
-
Try a delay of 1 minute. 5s may be too fast for the game to cope. Things often take a while to register.