GetCheckpointColor: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Welcome|desc=Gets the colour(r,g,b,a) of a checkpoint as a table. | params=<source>( checkpointId )</source> <poem>checkpointId : The ID of the checkpoint whose colour is to be obtained. </poem>| example=<source lang="lua"> if(IsCheckpointStreamedIn(checkpointId)) { local color=GetCheckpointColor(checkpointId); print("r: "+color.r+", g: "+color.g+ ", "b: "+color.b+", a: "+color.a+"\n"); } </source>| relfuncs=*GetCheckpointPos *GetCheckpointRadius *IsCheckpoin...") |
No edit summary |
||
Line 7: | Line 7: | ||
{ | { | ||
local color=GetCheckpointColor(checkpointId); | local color=GetCheckpointColor(checkpointId); | ||
print("r: "+color.r+", g: "+color.g+ ", | print("r: "+color.r+", g: "+color.g+ ", b: "+color.b+", a: "+color.a+"\n"); | ||
} | } | ||
</source>| | </source>| | ||
retvals=A table with keys {r,g,b,a} is returned on success. Throws error if checkpoint is not streamed in.| | |||
relfuncs=*[[GetCheckpointPos]] | relfuncs=*[[GetCheckpointPos]] | ||
*[[GetCheckpointRadius]] | *[[GetCheckpointRadius]] |
Latest revision as of 15:39, 12 November 2023
Description:
Gets the colour(r,g,b,a) of a checkpoint as a table.
Parameters:
( checkpointId )
checkpointId : The ID of the checkpoint whose colour is to be obtained.
Return Values:
A table with keys {r,g,b,a} is returned on success. Throws error if checkpoint is not streamed in.
Example
if(IsCheckpointStreamedIn(checkpointId)) { local color=GetCheckpointColor(checkpointId); print("r: "+color.r+", g: "+color.g+ ", b: "+color.b+", a: "+color.a+"\n"); }
Related Functions
The following functions may be helpful as they relate to this function in one way or another.