You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: This function is used to add a new point to an existing [colshape polygon](/wiki/CreateColPolygon
5
-
"CreateColPolygon").
3
+
description: This function is used to add a new point to an existing [colshape polygon](/reference/createColPolygon).
6
4
parameters:
7
5
- name: shape
8
6
type: colshape
@@ -15,21 +13,21 @@ shared:
15
13
description: The Y position of the new bound point.
16
14
- name: index
17
15
type: int
18
-
description: MISSING_PARAM_DESC
16
+
description: The index where the new point will be inserted in the polygon. The points are indexed in order, with 1 being the first bound point. Passing 0 will insert the point as the last one in the polygon.
19
17
default: '0'
20
-
examples:
21
-
- path: examples/addColPolygonPoint-1.lua
22
-
description: This examples adds a point to an existing polygon shape by a command.
23
-
side: server
24
18
returns:
25
19
values:
26
20
- type: bool
27
-
name: value
28
-
description: Returns true if the polygon was changed, false if invalid arguments
21
+
name: result
22
+
description: Returns **true** if the polygon was changed, **false** if invalid arguments
29
23
were passed.
30
24
oop:
31
25
element: colshape
32
26
method: addPoint
33
-
static: false
34
27
pair: removeColPolygonPoint
35
-
requires_review: true
28
+
29
+
server:
30
+
<<: *shared
31
+
examples:
32
+
- path: examples/addColPolygonPoint-1.lua
33
+
description: This examples adds a point to an existing polygon shape by a command.
description: This function creates a collision circle. This is a shape that has
5
-
a position and a radius and infinite height that you can use to detect a player's
6
-
presence. Events will be triggered when a player enters or leaves it.
3
+
description: This function creates a collision circle. This is a shape that has a position and a radius and infinite height. Events will be triggered when a [[element]] enters or leaves it.
7
4
parameters:
8
5
- name: fX
9
6
type: float
@@ -14,23 +11,29 @@ shared:
14
11
- name: radius
15
12
type: float
16
13
description: The radius of the collision circle. Can not be smaller than 0.1.
17
-
examples:
18
-
- path: examples/createColCircle-1.lua
19
-
description: This example displays a chat message when a player enters the colshape
20
-
and allows the colshape to be created using a console functionset_zone.
21
-
side: server
22
14
returns:
23
15
values:
24
-
- type: colshape
25
-
name: value
26
-
description: Returns a colshape element if successful, false if invalid arguments
16
+
- type: colshape|false
17
+
name: col-circle
18
+
description: Returns a [[colshape]] element if successful, **false** if invalid arguments
27
19
were passed to the function.
28
20
oop:
29
-
element: ColShape
21
+
element: colshape
30
22
method: Circle
31
23
static: true
32
24
notes:
33
25
- type: tip
34
-
content: To visualize a colshape when writing scripts, use the client console
35
-
command showcol
36
-
requires_review: true
26
+
content: To visualize a colshape when writing scripts, use the client console command [showcol](/articles/Client_commands#showcol).
27
+
preview_images:
28
+
- path: 'Colshapes/shape_circle.png'
29
+
30
+
server:
31
+
<<: *shared
32
+
examples:
33
+
- path: examples/createColCircle-1.lua
34
+
description: This example displays a chat message when a player enters the colshape
35
+
and allows the colshape to be created using a console command <code>set_zone</code>.
36
+
- path: examples/createColCircle_OOP-1.lua
37
+
description: This example displays a chat message when a player enters the colshape
38
+
and allows the colshape to be created using a console command <code>set_zone</code>.
0 commit comments