StartRecordingPlayback: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
(Created page with "{{Welcome| desc=This will run a .rec file which has to be saved in the npcscripts/recordings folder. The NPC will follow the actions recorded in the file.| params=<syntaxhighl...")
 
No edit summary
Line 11: Line 11:
StartRecordingPlayback(2,"stretch.rec");
StartRecordingPlayback(2,"stretch.rec");
}
}
</source>
</source>|
relfuncs=*[[StopRecordingPlayback]]
}}
}}

Revision as of 16:49, 9 March 2022


Description:
This will run a .rec file which has to be saved in the npcscripts/recordings folder. The NPC will follow the actions recorded in the file.


Parameters:

(playbacktype, recordname)

playbacktype : The type of the recording to be loaded
recordname : The name of the .rec file to run.


Return Values:
This function does not return any specific values.


Example

function OnNPCEnterVehicle(vehicleid, seatid)
{
	print("I entered vehicle "+vehicleid+" and my seat is "+seatid+"\n");
	StartRecordingPlayback(2,"stretch.rec");
}

Related Functions

The following functions may be helpful as they relate to this function in one way or another.