Jump to content
lolman1c

Inventory item that gives the holder an action?

Recommended Posts

Hello,

I was wondering if someone could help me. In the Config.cpp i'm trying have an inventory item give the user an action that triggers a sqf script. Anyone got any clue on how to do this? 

Edit: I looked at Addaction but not sure how to add it to Config. 

Edit 2: I would also like to make a custom grenade (which I know how to do) activate a supply drop. I know how to sqf the supply drop but unsure how I can get the custom grenade to activate the sqf when thrown. 

Share this post


Link to post
Share on other sites

For the grenade you could try using a fired event handler class in the cfgweapons fooMyGrenadebar_throw weapon entry

I've only ever used the 'init' event handler in cfg vehicle entries but a 'fired' event handler should work to execute a script when you 'fire' the grenade weapon

 

  • Like 1

Share this post


Link to post
Share on other sites

Regarding the supply drop, it's a common enough thing, and @SpaceHippo is right on with using the Fired EH in cfgWeapons - the most recent discussion I recall is here (Dedmen suggests cfgFunctions):

 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×