Home   Help Search Login Register  

Author Topic: Checking AMMO class through eventhandler/hint  (Read 1389 times)

0 Members and 1 Guest are viewing this topic.

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Checking AMMO class through eventhandler/hint
« 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
« Last Edit: 29 Apr 2009, 23:19:27 by laggy »
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline Deadfast

  • Members
  • *
Re: Checking AMMO class through eventhandler/hint
« Reply #1 on: 29 Apr 2009, 23:16:24 »
Quote
Passed array: [unit, weapon, muzzle, mode, ammo]

So _this select 4 is what you're looking for.

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Re: Checking AMMO class through eventhandler/hint
« Reply #2 on: 29 Apr 2009, 23:20:37 »
Just found that out at the wiki, I'm an idiot, thanks a lot anyway  :-[
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline i0n0s

  • Former Staff
  • ****
Re: Checking AMMO class through eventhandler/hint
« Reply #3 on: 30 Apr 2009, 00:42:42 »
And you can't createVehicle ammo, you can create a weaponholder and add the ammo in its cargo.

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: Checking AMMO class through eventhandler/hint
« Reply #4 on: 30 Apr 2009, 01:40:32 »
@ i0n0s,

You could do "ammotype" createvehicle pos, but you would just create the bullet rather than the magazine.

Luke
Pesky Human!!
Wort Wort Wort.

Offline i0n0s

  • Former Staff
  • ****
Re: Checking AMMO class through eventhandler/hint
« Reply #5 on: 30 Apr 2009, 01:59:03 »
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: