Weapon triggering LUA event?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

Weapon triggering LUA event?

Post 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! :)
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Weapon triggering LUA event?

Post 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.
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

Re: Weapon triggering LUA event?

Post by trainmaster611 »

Ok cool, we shall use that then. Thanks mang.
Post Reply