Page 1 of 1

Activating OnEnterRegion when specific object destroyed?

Posted: Thu Nov 07, 2013 9:27 pm
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

Re: activating OnEnterRegion

Posted: Thu Nov 07, 2013 10:00 pm
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.