23.03.2011, 22:42
(
Последний раз редактировалось _Outbreak_; 23.03.2011 в 23:40.
)
I'm working on an NPC that will continuously walk, but stop if a player gets close to it. I managed to make it work fine creating it in a filterscript, and then loading the NPC functions in the npcmodes folder.
I had to use a timer in the filterscript to check if the player was close by, and send a message to the player, and another timer in the script i added in npcmodes, to also check if the player is close, and to pause the recording playback.
I'm now trying to add it to my gamemode, I've got the NPC walking and detecting if a player is close by, then sending a message, but the NPC isn't stopping still because i've removed the timer from the script in npcmodes.
I want it to run on one timer, so that they don't clash. So i tried CallRemoteFunction using the two public functions below.
They're located in the NPC script in npcmodes folder, i'm trying to CallRemoteFunction in my gamemode, but it isn't happening.
Any ideas of how its possible, without using another timer in the npc script file?
I had to use a timer in the filterscript to check if the player was close by, and send a message to the player, and another timer in the script i added in npcmodes, to also check if the player is close, and to pause the recording playback.
I'm now trying to add it to my gamemode, I've got the NPC walking and detecting if a player is close by, then sending a message, but the NPC isn't stopping still because i've removed the timer from the script in npcmodes.
I want it to run on one timer, so that they don't clash. So i tried CallRemoteFunction using the two public functions below.
pawn Код:
public NPC_Pause()
{
PauseRecordingPlayback();
}
public NPC_Continue()
{
ResumeRecordingPlayback();
}
Any ideas of how its possible, without using another timer in the npc script file?