Activating OnEnterRegion when specific object destroyed?

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
Lorul1
Rebel Colonel
Rebel Colonel
Posts: 562
Joined: Wed Apr 24, 2013 10:34 pm
Projects :: Assault on Theed
Games I'm Playing :: Battlegrounds
xbox live or psn: No gamertag set
Location: Your House

Activating OnEnterRegion when specific object destroyed?

Post by Lorul1 »

My plan is to have an OnEnterRegion lua thing work for my map.
(sorry i don't know what those line of code like the ones here are called)

seams like a simple plan :thumbs:

BUT, I want the OnEnterRegion thing to ONLY work when a specific object is destroyed

if you still don't under stand, I want to inject a script into my lua so that it (my lua) will says this to my map ...

we have a region called "region 1". when the player enters "region 1", it animates something. "region 1" is disabled for now :( . we also have an object called "object 1". when "object 1" is destroyed then "region 1" will be activated.

can i add something to this to make my plan work?

wether the answer to my question above is yes or no I basicly need a tutorial or a exsample on how to do this. how can my plan work
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: activating OnEnterRegion

Post by AQT »

You see how the ActivateRegion function is actually not part of the OnEnterRegion function? That's because a region has to be activated first via ActivateRegion in order for OnEnterRegion to use that region.

I'm sure you are already familiar with the OnObjectKill function. So only activate the region once your object is destroyed.
Post Reply