Page 1 of 1

Is there a hook to tell when the party leaves a level?

Posted: Sat Nov 01, 2014 5:58 pm
by MrChoke
I know we got very limited info on hooks as of yet. But I am wondering if anybody knows of a hook that can fire when the party leaves or enters a level. Whether the hook is on the party or one stair/exits, doesn't matter. I cannot seem to find one. All I can think to do is look for level change in the party's onMove() hook but that seems far from ideal.

Re: Is there a hook to tell when the party leaves a level?

Posted: Sun Nov 02, 2014 1:49 am
by OGDA
I use two floor_triggers and a script to write the level name only when the party enters the level (when they leave, the name is not written):

The trigger next to the exit calls the function oldwfunc3() and the trigger directly next to it but further away from the exit calls oldwenter3().

Code: Select all

oldw3 = 0

function oldwenter3()
	oldw3 = 1
end

function oldwfunc3()
	if oldw3 == 0 then
		hudPrint("Here's the name of the level you are entering...")
	else
		oldw3 = 0
	end
end

Re: Is there a hook to tell when the party leaves a level?

Posted: Sun Nov 02, 2014 3:24 am
by MrChoke
OK, floor triggers. I can make that work. Thanks!