Difference between revisions of "SetColPolygonHeight"

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Fixed MTA version, example, added more explanation to function and the parameters)
Line 1: Line 1:
 
{{Server client function}}
 
{{Server client function}}
 
__NOTOC__
 
__NOTOC__
{{New feature/item|3.0158|1.5.7|20397|This function is used to change height of an existing [[createColPolygon|colshape polygon]].}}
+
{{New feature/item|3.0160|1.5.8|20807|This function is used to change the height of an existing [[createColPolygon|colshape polygon]].
 +
By default, a colshape polygon is infinitely tall.}}
  
 
==Syntax==  
 
==Syntax==  
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
bool setColPolygonHeight( colshape shape, float fFloor, float fCeil )   
+
bool setColPolygonHeight( colshape shape, float floor, float ceil )   
 
</syntaxhighlight>  
 
</syntaxhighlight>  
 
{{OOP||[[colshape]]:setHeight|}}
 
{{OOP||[[colshape]]:setHeight|}}
Line 11: Line 12:
 
===Required Arguments===  
 
===Required Arguments===  
 
*'''shape:''' The [[colshape]] polygon
 
*'''shape:''' The [[colshape]] polygon
*'''fFloor:''' The polygon floor
+
*'''floor:''' The polygon floor (lowest Z coordinate). Parse ''false'' to reset this value to 0.
*'''fCeil:''' The polygon ceil
+
*'''ceil:''' The polygon ceiling (highest Z coordinate). Parse ''false'' to reset this value to infinitely tall.
  
 
===Returns===
 
===Returns===
Line 18: Line 19:
  
 
==Example==
 
==Example==
<syntaxhighlight lang="lua">
+
{{Needs_Example}}
TODO
 
</syntaxhighlight>
 
  
 
==Requirements==
 
==Requirements==
{{Requirements|1.5.7-9.20397|1.5.7-9.20397|}}
+
{{Requirements|1.5.8-9.20807|1.5.8-9.20807|}}
  
 
==See Also==
 
==See Also==
 
{{Collision_shape_functions}}
 
{{Collision_shape_functions}}

Revision as of 21:20, 25 January 2021

BETA: FROM VERSION 1.5.8 r20807 ONWARDS
This function is used to change the height of an existing colshape polygon. By default, a colshape polygon is infinitely tall.

Syntax

bool setColPolygonHeight( colshape shape, float floor, float ceil )  

OOP Syntax Help! I don't understand this!

Method: colshape:setHeight(...)

Required Arguments

  • shape: The colshape polygon
  • floor: The polygon floor (lowest Z coordinate). Parse false to reset this value to 0.
  • ceil: The polygon ceiling (highest Z coordinate). Parse false to reset this value to infinitely tall.

Returns

Returns true if the polygon was changed, false if invalid arguments were passed.

Example

Accessories-text-editor.png Script Example Missing Function SetColPolygonHeight needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.


Requirements

Minimum supported server 1.5.8-9.20807
Minimum supported client 1.5.8-9.20807

Note: Using this function/event requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.5.8-9.20807" client="1.5.8-9.20807" />

See Also

BETA: FROM VERSION 1.5.8 r20807 ONWARDS
BETA: FROM VERSION 1.5.8 r20807 ONWARDS