NPC Scripting Functions
- NPC:StartRecordingPlayback: Run a .rec file which has to be saved in the npcmodes/recordings folder.
- NPC:StopRecordingPlayback: Stop the current .rec file which is being ran by the NPC, making it stay idle until some other order is given.
- NPC:PauseRecordingPlayback: Pause playing back the recording.
- NPC:ResumeRecordingPlayback: Resume the paused recording.
- NPC:SendChat: Send a player text by the bot, just like using SendPlayerMessageToAll, but this function is to be used inside the NPC scripts.
- NPC:SendCommand: Force the NPC to write a desired command, and this way, getting the effects it would produce.
- NPC:GetMyPos: Get the current location of the NPC.
- NPC:SetMyPos: Set the position of the NPC.
- NPC:GetMyFacingAngle: Get the current facing angle of the NPC.
- NPC:SetMyFacingAngle: Set the NPC's facing angle.
- NPC:GetDistanceFromMeToPoint: Get the distance between the NPC and a point.
- NPC:IsVehicleStreamedIn: Checks if a vehicle is streamed in for an NPC. Only nearby vehicles are streamed in.
- NPC:IsPlayerStreamedIn: Checks if a player is streamed in for an NPC. Only nearby players are streamed in.
Scripts
- ConnectNPC: Connect an NPC.
- IsPlayerNPC: Check if a player is an NPC or an actual player.
Pages in category "NPC Scripting Functions"
The following 15 pages are in this category, out of 15 total.