Game Development Community

Triggers fixed in HEAD revision

by Mark Frohnmayer · in Torque Game Engine · 04/15/2002 (5:05 pm) · 16 replies

Yo. I fixed (I think) that trigger wackiness where every other time it saved the trigger wouldn't work (this also applied to every time it was cut/pasted or inspect applied).

This should make it so that every new trigger you create works, and working triggers should not stop working... however, currently nonworking triggers still won't work, so you'll have to apply the fix manually to the .mis file.

At some point I'll go back in and fix it for real completely, but this should be sufficient for now.

If this still isn't working, lemme know.

#1
04/15/2002 (7:36 pm)
great! thanks a lot... i'll tell you if i find any problems with it
#2
04/16/2002 (7:24 am)
Thank you!
#3
04/16/2002 (10:32 am)
Thanks!
#4
04/16/2002 (1:17 pm)
Seems to be fixed.

Does anyone else have a problem with the head exe not releasing resources after closing it? I have to reboot to delete the bloody thing, just wondering if it is something I did :)
#5
04/23/2002 (5:00 am)
I can see my trigger saved where I placed it.
But I cannot hit it after saving closing and reloading.

(I can hit it right after I place it)
Oh and I can see the normal too ..
once ive saved and loaded that is.

ive determined this using a simple print in the script function's.

Works good for my door the first time I add it.
but once I save it the collision is gone :(

umm im adding it from InteriorInstance::addChildren()
but I dont think that should make a difference?
this is one of the last steps for my door :) woot!

thanks! :)
#6
04/23/2002 (5:46 am)
@Badguy

Well im no programmer at all but I did have a similar problem at one time. Please kkep in mind that I have no idea how yourt trigger works I just wanted to help out if I could.

In our game we have a flag trigger called Flipflop (like in T2). I t can have 3 different states, team0, team1 and team2.

When you place it in teh mission its team0, and when you run through it, it changes to team1 or team2.

If I do this in teh game and then save the mission teh flipflop trigger is then save as team1 (or team2) instead of team0.

So the next time I load the mission it can no longer be taken by team1.

But since yours are only a one side trigger maybe the same thing happens to you. Once you save it, you save its current state and you can no longer use it.

Anyway not sure if this helps but its worth a try.

// Clocks out
#7
04/23/2002 (5:56 am)
Ok
thanks for the response but..
im sure cause this is a defualt trigger
with no team properties and no other things stating the validness of it..
simply that my player object made the callback and the code should go thru there are no script side interuptions

for some reason the player does not find the trigger when the player has buildPolyList called on it
.. so it is making it in to process it ..
im not sure why it fails at this point will take more debuggin yet :)

Edit :
was hoping mark would have caught this one :)
.. Ok I will look into this when I get home.
#8
04/24/2002 (5:37 pm)
is anyone else suffering from this with the latest?

works when you just add it.
the trigger saves in right spot.
save, quit and comeback
and when you hit it the code breaks into the appropriate place but the player convex list comes back empty so it never triggers :(

ive not gotten any further on this one yet.

P.S.
heh I seem to be able to see them on the client when the server is editing :)
#9
04/27/2002 (1:41 pm)
is it broken again?
#10
04/28/2002 (2:32 pm)
Wierd, file is the same version as the server...

Mine still works, maybe get a clean version of triggers.cc for those who are having problems?
#11
04/28/2002 (7:40 pm)
hmm Ok indeed you are correct they work fine as long as you place them with the mission editor.

the ones im placing are placed with the
InteriorResource::addChildren()

I dont know Why this is different..
im trying to figure that out ..
Mark?
have you read this?
#12
06/20/2002 (11:08 am)
Just did :)

Hmm... the triggers only work properly if the plane normals are facing in the right direction (can't remember if it's in or out). The reason they were failing before is that the polyhedron would get exported in such a way that when it was read back in the plane normals would be pointing in the wrong direction. Not sure if this is the reason why your's aren't working...

- Mark
#13
02/02/2003 (5:29 am)
NM, there seems yo be something else wrong...
#14
08/13/2003 (6:33 am)
For some reason, the triggers seems to be broken again.
A player can run into a trigger to start the triggering process, onEnterTrigger() gets called and OnTickTrigger() is called but onLeaveTrigger() is never called. Which results in OnTickTrigger continuously being called, AND prevents the player from RE-entering the trigger again.

I tred to stop the trigger automatically with the base C++ call onLeaveTrigger() and the %obj.OnTrigger(%trigger, 0); but neither seeme to work.

Is anyone else getting this or is it me?
#15
01/08/2004 (3:52 pm)
This is still a problem!
#16
01/08/2004 (5:02 pm)
Yea in this one.