Interaction with objects
#6

Yes, and i told you could create a 1-sec repeating timer to check if the player is in range of the object, and then do your special action.
Here's an example of setting the timer:
pawn Код:
public OnGameModeInit()
{
    SetTimer("MyTimer", 1000, true);
    // "MyTimer" is the public function to call, etc. "public MyTimer()"
    // 1000 is the time it takes for the timer to end in milliseconds - 1 second = 1000 milliseconds
    // True/False if the timer should repeat or not
        // Since we wanna continue checking if the player is in range of the object, it should be repeating (true)
}
Reply


Messages In This Thread
Interaction with objects - by Laurentziu - 12.03.2015, 07:33
Re: Interaction with objects - by oliverrud - 12.03.2015, 07:36
Re: Interaction with objects - by Laurentziu - 12.03.2015, 07:40
Re: Interaction with objects - by CalvinC - 12.03.2015, 08:00
Re: Interaction with objects - by Laurentziu - 12.03.2015, 08:05
Re: Interaction with objects - by CalvinC - 12.03.2015, 08:09
Re: Interaction with objects - by Laurentziu - 12.03.2015, 08:13
Re: Interaction with objects - by Ph0eniX - 12.03.2015, 08:19
Re: Interaction with objects - by CalvinC - 12.03.2015, 08:27
Re: Interaction with objects - by Laurentziu - 12.03.2015, 08:44

Forum Jump:


Users browsing this thread: 1 Guest(s)