L
lorewap3
Guest
I don't know how to debug this issue I'm having as it's incredibly strange. It seems place_meeting is arbitrarily crashing my project after a few calls. I'm running the debugger when it happens, no error is given, it just silently quits. Cleaning and recompiling the project (even tried a restart) hasn't helped.
What's maddening is I have this method function in a struct (a physics manager for collision, gravity, etc)
Initially it was crashing on the first if. I verified all the variables are set and have values. It kept happening. But it does pass the first check. So I copy/pasted it two more times. All 3 if statements are identical.
It crashes on the 2nd one! Every time! This makes no sense to me. I don't even know how to debug this as there's no reason it doesn't crash on the first one but does on the 2nd.
Like I said...this is maddening!! If anyone has a suggestion on what to check please tell me!
Thanks,
Will P.
What's maddening is I have this method function in a struct (a physics manager for collision, gravity, etc)
GML:
static On_Ground = function() {
var _result = false;
//if (place_meeting(objectInstance.x + sign(gravX), objectInstance.y, solidObject) || place_meeting(objectInstance.x, objectInstance.y + sign(gravY), solidObject)) {
if (place_meeting(objectInstance.x + sign(gravX), objectInstance.y, solidObject)) {
_result = true;
}
if (place_meeting(objectInstance.x + sign(gravX), objectInstance.y, solidObject)) {
_result = true;
}
if (place_meeting(objectInstance.x + sign(gravX), objectInstance.y, solidObject)) {
_result = true;
}
//if (place_meeting(objectInstance.x, objectInstance.y + sign(gravY), solidObject)) {
// _result = true;
//}
return _result;
};
It crashes on the 2nd one! Every time! This makes no sense to me. I don't even know how to debug this as there's no reason it doesn't crash on the first one but does on the 2nd.
Like I said...this is maddening!! If anyone has a suggestion on what to check please tell me!
Thanks,
Will P.
Last edited by a moderator: