FlagCapture event not working

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
GAB
1st Lieutenant
1st Lieutenant
Posts: 431
Joined: Sun Jul 03, 2011 8:56 pm
Location: Somewhere around the world
Contact:

FlagCapture event not working

Post by GAB »

Well, the topic's title explains all. I would like a series of function to run when the flag is captured (i.e. brought to it's capture region), but they are not running.

Below is the section of my lua responsible for handling this:

Code: Select all

Flag_Capture = OnFlagCapture(
	function(flag, character)
                capturedflags = capturedflags + 1
                ShowMessageText("level.ABC.flagcaptured", ATT)
	end,
"flag1", "flag2"
)
I do get points for returning the flag, but the functions don't run. I've also tried OnFlagReturn instead of OnFlagCapture, but it did not work either. I also had no errors related to this in my log.
Post Reply