Scripting/Squirrel/Functions/Bounds: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
Decent 946 (talk | contribs) |
|||
Line 18: | Line 18: | ||
{ | { | ||
local boundaries = GetWorldBounds(); | local boundaries = GetWorldBounds(); | ||
print( "Worldboundaries has been set to :" + boundaries.maxX + "," + boundaries.minX + "," + boundaries.maxY + "," + boundaries. | print( "Worldboundaries has been set to :" + boundaries.maxX + "," + boundaries.minX + "," + boundaries.maxY + "," + boundaries.minY ); | ||
} | } | ||
</source> | </source> |
Revision as of 10:44, 30 December 2015
This Data type will hold world boundaries. You will get this Data Type when you use the GetWorldBounds function
Syntax
Bounds Bounds( maxX, minX, maxY, minY )
Arguments
- maxX - The max X coordination of the boundary.
- minX - The minimum X coordination of the boundary.
- maxY - The max Y coordination of the boundary.
- minY - The minimum Y coordination of the boundary.
Example
function onScriptLoad()
{
local boundaries = GetWorldBounds();
print( "Worldboundaries has been set to :" + boundaries.maxX + "," + boundaries.minX + "," + boundaries.maxY + "," + boundaries.minY );
}
Notes
The function GetWorldBounds and call onPlayerCommand were used in this example. More info about them in the corresponding pages.