Scripting/Squirrel/Functions/Checkpoint.Radius: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		

This wiki is using an old backup from 2020
Some information may be old/missing
| No edit summary | No edit summary | ||
| Line 1: | Line 1: | ||
| This function changes the size of a Checkpoint. | |||
| == Syntax == | == Syntax == | ||
| <pre>Checkpoint. | <pre>Checkpoint.Radius</pre> | ||
| == Arguments == | == Arguments == | ||
| int  | *''int'' '''Radius''' - The size/Radius of the checkpoint | ||
| == Example == | |||
| <source lang="squirrel"> | |||
| function onScriptLoad() | |||
| {  | |||
| 	CheckpointGreen <- CreateCheckpoint( null, 0, Vector( -378.79, -537.962, 17.2832 ), RGB(255, 0, 255), 2); | |||
| 	return 1; | |||
| } | |||
| function onPlayerCommand( player, command, arguments ) | |||
| { | { | ||
| if (  | 	if(cmd == "setcpsize") | ||
| { | 	{ | ||
| 		CheckpointGreen.Radius = 5; | |||
| 	} | |||
| 	return 1; | |||
| } | } | ||
| </source> | |||
| === Notes === | |||
| Call [[onScriptLoad]] and [[onPlayerCommand]] were used in this example. More info about them in the corresponding pages. | |||
| == Related Functions == | |||
| {{Scripting/Squirrel/Functions/Checkpoint_Functions}} | |||
Revision as of 20:34, 23 April 2016
This function changes the size of a Checkpoint.
Syntax
Checkpoint.Radius
Arguments
- int Radius - The size/Radius of the checkpoint
Example
function onScriptLoad()
{ 
	CheckpointGreen <- CreateCheckpoint( null, 0, Vector( -378.79, -537.962, 17.2832 ), RGB(255, 0, 255), 2);
	return 1;
}
function onPlayerCommand( player, command, arguments )
{
	if(cmd == "setcpsize")
	{
		CheckpointGreen.Radius = 5;
	}
	return 1;
}Notes
Call onScriptLoad and onPlayerCommand were used in this example. More info about them in the corresponding pages.