Page 1 of 1

Weapon triggering LUA event?

Posted: Thu Dec 25, 2008 7:58 pm
by trainmaster611
I've been intending to make a map where once a character initiates an ODF defined weapon within a certain region, it would trigger a series of LUA events including changing the LUA mission.

I know I've seen this is that RPG map by (ace-something?). He could trigger an LUA event by having the character walk up to another unit and use the 'talk' weapon and it would trigger a mission change or display some text.

Anyways, does anyone know how this is done?

PS -- Merry Christmas! :)

Re: Weapon triggering LUA event?

Posted: Thu Dec 25, 2008 10:34 pm
by Maveritchell
Both archer01 and I have used the OnCharacterDispensePowerup or OnCharacterDispenseControllable callbacks to make a "talk" weapon (in OFM and Aquilaris, respectively). It's not hard, but you'll want to look at the scripting_system doc file to learn how callbacks work.

Re: Weapon triggering LUA event?

Posted: Fri Dec 26, 2008 5:38 pm
by trainmaster611
Ok cool, we shall use that then. Thanks mang.