OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: laggy on 29 Apr 2009, 23:12:20
-
EDIT: _this select 4
does return the ammo class, sorry :-[
Hello,
I'm building a mission with ACEmod.
What I need to know is the name of certain ammo classes so that I can createVehicle those when desired.
I could of course just use BIS regular, but the immersion effects (ears ringing etc.) does only work for ACE classes.
Unfortunately ACEmod's class list does NOT include ammo, just weapons and magazines.
Is there a way to check what the ammo class fired is called through an eventhandler with a hint?
What I don't know is how to check for the ammo class fired and get that string/class name, I know enough about hints and eventhandlers.
_ammo = _this select (1-3) in an eventhandler "fired" doesn't seem to work, while "_this select 0" does return the "shooter".
Do I need to use near(est)Object(s) or something?
Is it possible at all?
Thanks in advance,
Laggy
-
Passed array: [unit, weapon, muzzle, mode, ammo]
So _this select 4 is what you're looking for.
-
Just found that out at the wiki, I'm an idiot, thanks a lot anyway :-[
-
And you can't createVehicle ammo, you can create a weaponholder and add the ammo in its cargo.
-
@ i0n0s,
You could do "ammotype" createvehicle pos, but you would just create the bullet rather than the magazine.
Luke
-
I thought of the magazine, maybe because I'm currently reworking that part of the RTE :-[
You can create bullets via createVehicle and you can crash ArmA by adding the ammotype in the mission.sqm :whistle: