Frictional Games Forum (read-only)

Full Version: My collide functions doesn't work properly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
There is a painful way of countering it for sure, by having a looping timer that continouisly adds the checks until they have been used. I don't think timers stop when loading an autosave. If they do though, it won't work.
Yeah, I've heard of this solution somewhere in the forum before, but don't really understand how it works. Besides, haven't tried either due that it haven't been necessary so far. Until now.
Instead of having the callbacks in OnStart, you place them in a timer.

PHP Code:
void OnStart()
{
    
TimerCallbacks("cb");
}

void TimerCallbacks(string &in asTimer)
{
    if(
GetLocalVarInt("Collide1") == 0)
        
AddEntityCollideCallback("entity1""entity2""EventName"true1);

    
AddTimer(asTimer10"TimerCallbacks");
}

void EventName(string &in asParentstring &in asChildint alState)
{
    
SetLocalVarInt("Collide1"1);

    
WhateverElse();


Here's an example I just made up. It would probably work. It just checks if this callback has happened. If it has, it will ignore adding it, but if it hasn't happened yet, it will add another callback for it every 10 seconds. You can change the frequency if you'd like it to refresh faster.

This is one way to counter it but it shouldn't be necessary. I hope we can find the reason for this "bug" whether it is one or not.
Alright, thanks man. As you said, let's hope we can find this problem real quick.
Wait, wait.
Did you try if using a new Amnesia profile solves the problem?
Cause, hopefully, this only happens to those who had older versions of your mod.
Maybe the autosave function made several game saves of different versions of your maps and considers your new saves older cause you've progressed a little more in older game saves.
Just thinking, I could be wrong.

Another possibility is that you have a duplicate of your .map or your .hps somewhere in your directories and Amnesia is using that one instead.
Check if everything in-game looks the same as in LE. And put a debug message in your script file just to make sure is reading it right. Make the debug message loop and try an autosave, see if the msg is still going.
Amn, those maps have not been updated in a long time. I will probably eventually but for now I've just left them as they are for nearly a month. However, I could try a new profile as you said. And I'm certain to 100% I don't have any duped maps.
Pages: 1 2