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
#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


Messages In This Thread
RE: My collide functions doesn't work properly - by Mudbill - 04-25-2014, 05:03 PM



Users browsing this thread: 1 Guest(s)