Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help My collide functions doesn't work properly
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#11
RE: My collide functions doesn't work properly

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.

04-25-2014, 04:21 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#12
RE: My collide functions doesn't work properly

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.

Derp.
04-25-2014, 04:27 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#13
RE: My collide functions doesn't work properly

Instead of having the callbacks in OnStart, you place them in a timer.

PHP Code: (Select All)
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.

(This post was last modified: 04-25-2014, 05:05 PM by Mudbill.)
04-25-2014, 05:03 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#14
RE: My collide functions doesn't work properly

Alright, thanks man. As you said, let's hope we can find this problem real quick.

Derp.
04-25-2014, 08:24 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#15
RE: My collide functions doesn't work properly

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.

04-26-2014, 03:13 AM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#16
RE: My collide functions doesn't work properly

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.

Derp.
04-26-2014, 09:17 AM
Find




Users browsing this thread: 2 Guest(s)