Game Development Community

OnEnter for DIF (InteriorInstance)?

by Katrina Rose · in Torque Game Engine · 10/26/2004 (4:43 am) · 4 replies

Hi,

Is there a way to find out when a player enters a building without using a trigger box? I need to stop a timer when the player enters a building. Any help is always apreciated.

Marrion

#1
10/26/2004 (4:46 am)
Not really, triggers are there for such things
#2
10/26/2004 (4:49 am)
Thanks Anthony,

So there is no OnEnter function for InteriorInstance?
#3
10/26/2004 (5:21 am)
Hello Katrina

Yes there is no OnEnter function for InteriorInstance, and triggers are not always the answer.

But there is one way to find out if a point is in inside an interior and thats using the consolefunction isPointInside.

You pass it a Point3F or x,y,z and it will return true if inside ANY interior.

I expect you will want to know if you are in a specific interior. I would suggest maybe looking at the isPointInside function and creating a new one that will only check the interior you are interested in. (Maybe a passed parameter of name to identify the interior??)

Well good luck, and keep us informed. I may need something like this myself in the near future.
#4
10/26/2004 (7:38 am)
I just made a trigger that stops the game timer and a waypoint timer as long as you are inside of it. It works like a charm. The only thing I have to do is copy this to each interior that I want to stop the time for. Thanks Anthony it works Great.

@Simon
Thanks, I will try that aproach also to see if it's any better.