Page 1 of 1
Remove ammo from magazine?
Posted: Tue Jul 03, 2018 10:21 am
by Gunner98
Have been trying to delete ammo from a magazine with this:
ScenEdit_AddWeaponToUnitMagazine({guid='795bcb77-1bc0-457b-93d4-cc28fc26c0dc', wpn_dbid=1383, number=72, remove=y})
I must have something messed up because it adds the 72 weapons instead of removing them. Any ideas?
Thanks
RE: Remove ammo from magazine?
Posted: Wed Jul 04, 2018 2:12 am
by hasler
Does putting in a negative integer work
RE: Remove ammo from magazine?
Posted: Wed Jul 04, 2018 5:01 am
by TyphoonFr
Replace "y" with "true"
ScenEdit_AddWeaponToUnitMagazine({guid='795bcb77-1bc0-457b-93d4-cc28fc26c0dc', wpn_dbid=1383, number=72, remove=true})
RE: Remove ammo from magazine?
Posted: Wed Jul 04, 2018 5:32 am
by TyphoonFr
I noticed that you use 'y' instead of 'true' regularly.
For example 'Lua - Hurc Ammo delivery Stykkishólmur' in 'Northern Fury 25 Jar Heads on Ice!' :
ScenEdit_AddWeaponToUnitMagazine ({Side='USN',guid='f3fd8561-af44-4013-944f-09a77762c644',wpn_dbid= 1814,number=16,w_max=250,new=y}) --- Mk-82
A binary variable (Bool), a two possible values called 'true' and 'false'.You think 'new =y' works but in your case, you do not need to use 'new=true'
try without:
ScenEdit_AddWeaponToUnitMagazine ({Side ='USN',guid ='f3fd8561-af44-4013-944f-09a77762c644',wpn_dbid=1814, number=16,w_max=250}) --- Mk-82
RE: Remove ammo from magazine?
Posted: Wed Jul 04, 2018 6:52 am
by Gunner98
Thank you - 'true' works.
The negative integer does not work, but good idea.
Thanks guys
B
RE: Remove ammo from magazine?
Posted: Wed Jul 04, 2018 8:05 am
by michaelm75au
To remove, use the 'remove=true'. The number is always positive.