1.7.3 - Trigger onLeave
by Thomas Bang · in Torque Game Builder · 05/23/2008 (5:52 am) · 10 replies
These lines work perfectly in TGB 1.7.2
Now i have problems in 1.7.3
Now i have problems in 1.7.3
function triggerClass::onLeave(%this, %object)
{
if (%object == $pGuy)
{
$pGuy.delete();
}
}
#2
Yes, onLeave seems to be not working. The callback onEnter works.
Can you confirm this "bug"?
I will use safeDelete() instead delete()
05/23/2008 (7:16 am)
Oh...sorry... my mistake. Yes, onLeave seems to be not working. The callback onEnter works.
Can you confirm this "bug"?
I will use safeDelete() instead delete()
#3
There was an issue that was found by Phillp O'Shea (PSK) the day after the v1.7.3 release that may be the source of your problems. It's been fixed but obviously hasn't been released yet. It may have made it into the MAC release which happen a few days later but I'm not sure.
If you own the source then you can enter the bug fix in "t2dTrigger.cc" (line 177) which should be:
That one was my fault or more specifically the Subversion on my machine never committed the change. The repo didn't have the change but my working copy did and it said there was no difference between the two. Sometimes subversion gets confused.
Unfortunately there was a last minute change due to reports of people using the t2dTrigger in a certain way which were incompatible with some previous changes.
It also may not be the reason you're having a problem.
Melv.
05/23/2008 (7:28 am)
Could you provide a simple script example of what you're doing to "melv (dot) may (at) gmail (dot) com"?There was an issue that was found by Phillp O'Shea (PSK) the day after the v1.7.3 release that may be the source of your problems. It's been fixed but obviously hasn't been released yet. It may have made it into the MAC release which happen a few days later but I'm not sure.
If you own the source then you can enter the bug fix in "t2dTrigger.cc" (line 177) which should be:
mColliderDoubleBufferMap[mCurrentColliderMapIndex].clear();...instead of...
mColliderDoubleBufferMap[mCurrentColliderMapIndex];
That one was my fault or more specifically the Subversion on my machine never committed the change. The repo didn't have the change but my working copy did and it said there was no difference between the two. Sometimes subversion gets confused.
Unfortunately there was a last minute change due to reports of people using the t2dTrigger in a certain way which were incompatible with some previous changes.
It also may not be the reason you're having a problem.
Melv.
#4
Thank you very much.
05/23/2008 (12:31 pm)
Yes, i have the source version of TGB. I made the changes and it works now. Thank you very much.
#6
Many thanks,
06/15/2008 (11:19 pm)
Is there any chance for people that don't have the source to get this problem solved as well? Many thanks,
#7
06/18/2008 (10:00 am)
The fix is coming in a subsequent release Teddy. No word on when it's coming.. but we are all waiting!! Since melv and the gang take pride in their work, and do a damn good job of it, I have to expect it's coming soon to a release near you! I think they would rather fix a couple other things then send out a hasty release.
#8
It's unlikely I'll be able to get around to processing all the bugs reported including all the testing needed if we're to expedite this release but I'm trying my absolute best to get it together.
Unfotunately the reality is that when it's done, the packaging and setup takes significant resources to get it out to you guys.
Watch this space!
Melv.
06/18/2008 (10:42 am)
No promises but it shouldn't be too long. Again, sorry for this annoying and silly bug, it's a shame it spoilt what was otherwise, we feel, a really nice release!It's unlikely I'll be able to get around to processing all the bugs reported including all the testing needed if we're to expedite this release but I'm trying my absolute best to get it together.
Unfotunately the reality is that when it's done, the packaging and setup takes significant resources to get it out to you guys.
Watch this space!
Melv.
#9
07/07/2008 (5:51 pm)
Thanks for all the hard work on it guys, I was having the same problem with not having it call back, was driving me nuts till I found this bug report. Once I get my compiler up and running I'll impliment the fix you listed above.
Associate Melv May
As a rule you should always use ".safeDelete()" when deleting objects that are passed as a reference in a callback. The reason is that you delete the object and you don't know if the calling object (in this case the t2dTrigger) still needs to refer to it.
The "safeDelete" method defers the actual delete until it is safe to do so. It's dealt with (in the meantime) as if it were deleted.
Melv.