@tlua/gmod 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/achievementicon.d.tlua +0 -1
- package/types/achievements.d.tlua +0 -31
- package/types/ai.d.tlua +0 -11
- package/types/ai_schedule.d.tlua +0 -1
- package/types/ai_task.d.tlua +0 -1
- package/types/angle.d.tlua +0 -37
- package/types/avatarimage.d.tlua +0 -1
- package/types/awesomium.d.tlua +0 -1
- package/types/baseclass.d.tlua +0 -4
- package/types/bf_read.d.tlua +0 -23
- package/types/bit.d.tlua +0 -23
- package/types/button.d.tlua +0 -1
- package/types/cam.d.tlua +0 -33
- package/types/ceffectdata.d.tlua +0 -65
- package/types/chat.d.tlua +0 -11
- package/types/checkbutton.d.tlua +0 -1
- package/types/cleanup.d.tlua +0 -15
- package/types/cluaemitter.d.tlua +0 -25
- package/types/clualocomotion.d.tlua +0 -81
- package/types/cluaparticle.d.tlua +0 -89
- package/types/cmovedata.d.tlua +0 -95
- package/types/cnavarea.d.tlua +0 -155
- package/types/cnavladder.d.tlua +0 -45
- package/types/cnewparticleeffect.d.tlua +0 -53
- package/types/color.d.tlua +0 -57
- package/types/concommand.d.tlua +0 -9
- package/types/constraint.d.tlua +0 -57
- package/types/construct.d.tlua +0 -3
- package/types/contentheader.d.tlua +1 -6
- package/types/contenticon.d.tlua +1 -18
- package/types/contentsidebar.d.tlua +1 -8
- package/types/contentsidebartoolbox.d.tlua +0 -1
- package/types/contextbase.d.tlua +1 -8
- package/types/controlpanel.d.tlua +6 -31
- package/types/controlpresets.d.tlua +1 -26
- package/types/convar.d.tlua +0 -33
- package/types/cookie.d.tlua +0 -7
- package/types/coroutine.d.tlua +0 -15
- package/types/crecipientfilter.d.tlua +0 -33
- package/types/csent.d.tlua +0 -1
- package/types/csoundpatch.d.tlua +0 -29
- package/types/ctakedamageinfo.d.tlua +0 -67
- package/types/ctrllistbox.d.tlua +0 -1
- package/types/ctrlnumpad.d.tlua +0 -13
- package/types/cusercmd.d.tlua +0 -55
- package/types/custom_entity_fields.d.tlua +0 -1
- package/types/cvars.d.tlua +0 -13
- package/types/dadjustablemodelpanel.d.tlua +1 -14
- package/types/dalphabar.d.tlua +1 -6
- package/types/dbinder.d.tlua +1 -8
- package/types/dbubblecontainer.d.tlua +1 -4
- package/types/dbutton.d.tlua +1 -16
- package/types/dcategoryheader.d.tlua +0 -1
- package/types/dcategorylist.d.tlua +0 -1
- package/types/dcheckbox.d.tlua +1 -10
- package/types/dcheckboxlabel.d.tlua +0 -19
- package/types/dcollapsiblecategory.d.tlua +1 -46
- package/types/dcolorbutton.d.tlua +1 -14
- package/types/dcolorcombo.d.tlua +1 -10
- package/types/dcolorcube.d.tlua +1 -26
- package/types/dcolormixer.d.tlua +1 -54
- package/types/dcolorpalette.d.tlua +1 -46
- package/types/dcolumnsheet.d.tlua +1 -10
- package/types/dcombobox.d.tlua +1 -34
- package/types/ddragbase.d.tlua +1 -26
- package/types/ddrawer.d.tlua +1 -16
- package/types/debug.d.tlua +25 -60
- package/types/debugoverlay.d.tlua +0 -23
- package/types/dentityproperties.d.tlua +1 -10
- package/types/derma.d.tlua +0 -21
- package/types/dexpandbutton.d.tlua +1 -6
- package/types/dfilebrowser.d.tlua +0 -41
- package/types/dform.d.tlua +1 -36
- package/types/dframe.d.tlua +0 -49
- package/types/dgrid.d.tlua +1 -22
- package/types/dhorizontaldivider.d.tlua +1 -40
- package/types/dhorizontalscroller.d.tlua +1 -22
- package/types/dhscrollbar.d.tlua +1 -22
- package/types/dhtml.d.tlua +1 -16
- package/types/dhtmlcontrols.d.tlua +0 -11
- package/types/diconbrowser.d.tlua +1 -22
- package/types/diconlayout.d.tlua +1 -36
- package/types/dimage.d.tlua +1 -39
- package/types/dimagebutton.d.tlua +0 -19
- package/types/dkillicon.d.tlua +0 -1
- package/types/dlabel.d.tlua +1 -66
- package/types/dlabeleditable.d.tlua +1 -10
- package/types/dlabelurl.d.tlua +1 -20
- package/types/dlistbox.d.tlua +1 -16
- package/types/dlistboxitem.d.tlua +1 -8
- package/types/dlistlayout.d.tlua +0 -1
- package/types/dlistview.d.tlua +1 -68
- package/types/dlistview_column.d.tlua +1 -28
- package/types/dlistview_columnplain.d.tlua +0 -1
- package/types/dlistview_draggerbar.d.tlua +0 -1
- package/types/dlistview_line.d.tlua +1 -26
- package/types/dlistviewheaderlabel.d.tlua +0 -1
- package/types/dlistviewlabel.d.tlua +0 -1
- package/types/dlistviewline.d.tlua +0 -1
- package/types/dmenu.d.tlua +1 -53
- package/types/dmenubar.d.tlua +1 -11
- package/types/dmenuoption.d.tlua +1 -26
- package/types/dmenuoptioncvar.d.tlua +1 -12
- package/types/dmodelpanel.d.tlua +1 -44
- package/types/dmodelselect.d.tlua +1 -4
- package/types/dmodelselectmulti.d.tlua +1 -4
- package/types/dnotify.d.tlua +1 -20
- package/types/dnumberscratch.d.tlua +1 -52
- package/types/dnumberwang.d.tlua +1 -32
- package/types/dnumpad.d.tlua +0 -1
- package/types/dnumslider.d.tlua +0 -35
- package/types/dpanel.d.tlua +1 -28
- package/types/dpanellist.d.tlua +0 -23
- package/types/dpaneloverlay.d.tlua +1 -14
- package/types/dpanelselect.d.tlua +0 -1
- package/types/dpanpanel.d.tlua +1 -12
- package/types/dprogress.d.tlua +1 -6
- package/types/dproperties.d.tlua +1 -8
- package/types/dproperty_boolean.d.tlua +0 -1
- package/types/dproperty_combo.d.tlua +1 -6
- package/types/dproperty_entity.d.tlua +0 -1
- package/types/dproperty_float.d.tlua +0 -1
- package/types/dproperty_generic.d.tlua +1 -10
- package/types/dproperty_int.d.tlua +0 -1
- package/types/dproperty_vectorcolor.d.tlua +0 -1
- package/types/dpropertysheet.d.tlua +9 -41
- package/types/dragndrop.d.tlua +0 -21
- package/types/draw.d.tlua +0 -22
- package/types/drgbpicker.d.tlua +1 -8
- package/types/drive.d.tlua +6 -31
- package/types/dscrollbargrip.d.tlua +0 -1
- package/types/dscrollpanel.d.tlua +0 -21
- package/types/dshape.d.tlua +1 -14
- package/types/dsizetocontents.d.tlua +1 -10
- package/types/dslider.d.tlua +1 -56
- package/types/dsprite.d.tlua +1 -18
- package/types/dtab.d.tlua +1 -16
- package/types/dtextentry.d.tlua +1 -86
- package/types/dtilelayout.d.tlua +1 -42
- package/types/dtooltip.d.tlua +1 -12
- package/types/dtree.d.tlua +1 -32
- package/types/dtree_node.d.tlua +1 -136
- package/types/dtree_node_button.d.tlua +0 -1
- package/types/duplicator.d.tlua +0 -60
- package/types/dverticaldivider.d.tlua +1 -46
- package/types/dvscrollbar.d.tlua +1 -22
- package/types/editablepanel.d.tlua +0 -1
- package/types/effect.d.tlua +1 -8
- package/types/effects.d.tlua +0 -13
- package/types/engine.d.tlua +0 -43
- package/types/entity.d.tlua +2 -1319
- package/types/ents.d.tlua +0 -44
- package/types/enums.d.tlua +0 -1
- package/types/file.d.tlua +0 -79
- package/types/file_class.d.tlua +0 -1
- package/types/fingerposer.d.tlua +0 -1
- package/types/fingervar.d.tlua +0 -1
- package/types/frame.d.tlua +0 -1
- package/types/frame_blend.d.tlua +0 -15
- package/types/game.d.tlua +0 -79
- package/types/gameevent.d.tlua +4 -9
- package/types/gamemode.d.tlua +0 -6
- package/types/global.d.tlua +0 -18
- package/types/gm.d.tlua +0 -535
- package/types/gmod.d.tlua +0 -1
- package/types/gmsave.d.tlua +0 -9
- package/types/gui.d.tlua +0 -43
- package/types/gwen.d.tlua +0 -7
- package/types/halo.d.tlua +0 -5
- package/types/hammer.d.tlua +0 -1
- package/types/hook.d.tlua +0 -9
- package/types/html.d.tlua +0 -1
- package/types/http.d.tlua +0 -3
- package/types/iconeditor.d.tlua +1 -22
- package/types/igmodaudiochannel.d.tlua +0 -83
- package/types/imagecheckbox.d.tlua +1 -8
- package/types/imaterial.d.tlua +0 -53
- package/types/imesh.d.tlua +0 -11
- package/types/input.d.tlua +0 -47
- package/types/invalidateinternalentitycache.d.tlua +0 -1
- package/types/irestore.d.tlua +0 -19
- package/types/isave.d.tlua +0 -19
- package/types/itexture.d.tlua +0 -21
- package/types/ivideowriter.d.tlua +0 -11
- package/types/jit.d.tlua +9 -42
- package/types/killicon.d.tlua +0 -15
- package/types/label.d.tlua +0 -1
- package/types/language.d.tlua +0 -3
- package/types/list.d.tlua +0 -17
- package/types/makeballoon.d.tlua +0 -1
- package/types/markup.d.tlua +0 -5
- package/types/markupobject.d.tlua +0 -11
- package/types/material.d.tlua +0 -1
- package/types/math.d.tlua +200 -371
- package/types/matproxy.d.tlua +0 -7
- package/types/matselect.d.tlua +1 -22
- package/types/menu.d.tlua +0 -1
- package/types/menubar.d.tlua +0 -5
- package/types/mesh.d.tlua +0 -39
- package/types/modelimage.d.tlua +0 -1
- package/types/motionsensor.d.tlua +0 -21
- package/types/navmesh.d.tlua +0 -53
- package/types/net.d.tlua +0 -104
- package/types/nextbot.d.tlua +10 -83
- package/types/notification.d.tlua +0 -5
- package/types/npc.d.tlua +1 -364
- package/types/numpad.d.tlua +0 -15
- package/types/os.d.tlua +0 -8
- package/types/package.d.tlua +0 -1
- package/types/panel.d.tlua +2 -662
- package/types/panellist.d.tlua +0 -1
- package/types/pathfollower.d.tlua +0 -63
- package/types/permissions.d.tlua +0 -13
- package/types/physcollide.d.tlua +0 -7
- package/types/physenv.d.tlua +0 -23
- package/types/physobj.d.tlua +0 -157
- package/types/pixelvis_handle_t.d.tlua +0 -1
- package/types/player.d.tlua +11 -594
- package/types/player_manager.d.tlua +0 -27
- package/types/preseteditor.d.tlua +0 -1
- package/types/presets.d.tlua +0 -13
- package/types/projectedtexture.d.tlua +0 -97
- package/types/properties.d.tlua +0 -11
- package/types/propselect.d.tlua +1 -10
- package/types/radiobutton.d.tlua +0 -1
- package/types/render.d.tlua +0 -285
- package/types/resource.d.tlua +0 -5
- package/types/richtext.d.tlua +0 -1
- package/types/sandbox.d.tlua +1 -108
- package/types/saverestore.d.tlua +0 -25
- package/types/schedule.d.tlua +0 -13
- package/types/scripted_ents.d.tlua +0 -21
- package/types/search.d.tlua +0 -3
- package/types/serverlist.d.tlua +0 -15
- package/types/slidebar.d.tlua +0 -1
- package/types/slider.d.tlua +0 -1
- package/types/sound.d.tlua +0 -21
- package/types/spawnicon.d.tlua +1 -16
- package/types/spawnmenu.d.tlua +0 -48
- package/types/spawnmenucontentpanel.d.tlua +1 -10
- package/types/sql.d.tlua +0 -19
- package/types/stack.d.tlua +0 -11
- package/types/steamworks.d.tlua +0 -37
- package/types/string.d.tlua +0 -96
- package/types/structures.d.tlua +0 -7
- package/types/surface.d.tlua +0 -69
- package/types/surfaceinfo.d.tlua +0 -11
- package/types/system.d.tlua +0 -21
- package/types/table.d.tlua +0 -93
- package/types/task.d.tlua +0 -19
- package/types/team.d.tlua +0 -39
- package/types/textentry.d.tlua +0 -1
- package/types/tgaimage.d.tlua +0 -1
- package/types/timer.d.tlua +0 -29
- package/types/tool.d.tlua +1 -90
- package/types/ugcpublishwindow.d.tlua +1 -18
- package/types/umsg.d.tlua +0 -25
- package/types/undo.d.tlua +0 -21
- package/types/urllabel.d.tlua +0 -1
- package/types/usermessage.d.tlua +0 -5
- package/types/utf8.d.tlua +0 -15
- package/types/util.d.tlua +0 -185
- package/types/vector.d.tlua +0 -73
- package/types/vehicle.d.tlua +2 -102
- package/types/vgui.d.tlua +0 -33
- package/types/video.d.tlua +0 -1
- package/types/vmatrix.d.tlua +0 -71
- package/types/weapon.d.tlua +2 -168
- package/types/weapons.d.tlua +0 -12
- package/types/widgets.d.tlua +0 -3
- package/types/workshopfilebase.d.tlua +0 -11
package/types/npc.d.tlua
CHANGED
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
* This is a list of all methods only available for NPCs. It is also possible to call [Entity](https://wiki.facepunch.com/gmod/Entity) functions on NPCs.
|
|
5
5
|
* @source https://wiki.facepunch.com/gmod/NPC
|
|
6
6
|
*/
|
|
7
|
-
interface NPC extends Entity {
|
|
8
|
-
|
|
9
|
-
interface NPC {
|
|
7
|
+
interface NPC extends Entity {
|
|
10
8
|
/**
|
|
11
9
|
* Makes the NPC like, hate, feel neutral towards, or fear the entity in question. If you want to setup relationship towards a certain entity `class`, use [NPC:AddRelationship](https://wiki.facepunch.com/gmod/NPC:AddRelationship).
|
|
12
10
|
*
|
|
@@ -17,9 +15,7 @@ interface NPC {
|
|
|
17
15
|
* @source https://wiki.facepunch.com/gmod/NPC:AddEntityRelationship
|
|
18
16
|
*/
|
|
19
17
|
AddEntityRelationship(self: NPC, target: Entity, disposition: number, priority?: number): void;
|
|
20
|
-
}
|
|
21
18
|
|
|
22
|
-
interface NPC {
|
|
23
19
|
/**
|
|
24
20
|
* Changes how an NPC feels towards another NPC. If you want to setup relationship towards a certain `entity`, use [NPC:AddEntityRelationship](https://wiki.facepunch.com/gmod/NPC:AddEntityRelationship).
|
|
25
21
|
*
|
|
@@ -30,9 +26,7 @@ interface NPC {
|
|
|
30
26
|
* @source https://wiki.facepunch.com/gmod/NPC:AddRelationship
|
|
31
27
|
*/
|
|
32
28
|
AddRelationship(self: NPC, relationstring: string): void;
|
|
33
|
-
}
|
|
34
29
|
|
|
35
|
-
interface NPC {
|
|
36
30
|
/**
|
|
37
31
|
* Advances the NPC on its path to the next waypoint.
|
|
38
32
|
* **WARNING**: Calling this on an NPC without any route will result in an instant crash.
|
|
@@ -42,81 +36,63 @@ interface NPC {
|
|
|
42
36
|
* @source https://wiki.facepunch.com/gmod/NPC:AdvancePath
|
|
43
37
|
*/
|
|
44
38
|
AdvancePath(self: NPC): void;
|
|
45
|
-
}
|
|
46
39
|
|
|
47
|
-
interface NPC {
|
|
48
40
|
/**
|
|
49
41
|
* Force an NPC to play their Alert sound.
|
|
50
42
|
* @realm server
|
|
51
43
|
* @source https://wiki.facepunch.com/gmod/NPC:AlertSound
|
|
52
44
|
*/
|
|
53
45
|
AlertSound(self: NPC): void;
|
|
54
|
-
}
|
|
55
46
|
|
|
56
|
-
interface NPC {
|
|
57
47
|
/**
|
|
58
48
|
* Executes any movement the current sequence may have.
|
|
59
49
|
* @realm server
|
|
60
50
|
* @source https://wiki.facepunch.com/gmod/NPC:AutoMovement
|
|
61
51
|
*/
|
|
62
52
|
AutoMovement(self: NPC, interval: number, target?: Entity): boolean;
|
|
63
|
-
}
|
|
64
53
|
|
|
65
|
-
interface NPC {
|
|
66
54
|
/**
|
|
67
55
|
* Become a ragdoll and remove the entity. Internally handles serverside/clientside ragdoll creation, momentum calculation, triggering ragdoll creation hooks / events and cloning entity's bone transforms to the created ragdoll.
|
|
68
56
|
* @realm server
|
|
69
57
|
* @source https://wiki.facepunch.com/gmod/NPC:BecomeRagdoll
|
|
70
58
|
*/
|
|
71
59
|
BecomeRagdoll(self: NPC, info: CTakeDamageInfo): Entity;
|
|
72
|
-
}
|
|
73
60
|
|
|
74
|
-
interface NPC {
|
|
75
61
|
/**
|
|
76
62
|
* Adds a capability to the NPC.
|
|
77
63
|
* @realm server
|
|
78
64
|
* @source https://wiki.facepunch.com/gmod/NPC:CapabilitiesAdd
|
|
79
65
|
*/
|
|
80
66
|
CapabilitiesAdd(self: NPC, capabilities: CAP): void;
|
|
81
|
-
}
|
|
82
67
|
|
|
83
|
-
interface NPC {
|
|
84
68
|
/**
|
|
85
69
|
* Removes all of Capabilities the NPC has.
|
|
86
70
|
* @realm server
|
|
87
71
|
* @source https://wiki.facepunch.com/gmod/NPC:CapabilitiesClear
|
|
88
72
|
*/
|
|
89
73
|
CapabilitiesClear(self: NPC): void;
|
|
90
|
-
}
|
|
91
74
|
|
|
92
|
-
interface NPC {
|
|
93
75
|
/**
|
|
94
76
|
* Returns the NPC's capabilities along the ones defined on its weapon.
|
|
95
77
|
* @realm server
|
|
96
78
|
* @source https://wiki.facepunch.com/gmod/NPC:CapabilitiesGet
|
|
97
79
|
*/
|
|
98
80
|
CapabilitiesGet(self: NPC): CAP;
|
|
99
|
-
}
|
|
100
81
|
|
|
101
|
-
interface NPC {
|
|
102
82
|
/**
|
|
103
83
|
* Checks whether the NPC has the specified capabilities.
|
|
104
84
|
* @realm server
|
|
105
85
|
* @source https://wiki.facepunch.com/gmod/NPC:CapabilitiesHas
|
|
106
86
|
*/
|
|
107
87
|
CapabilitiesHas(self: NPC, capabilities: CAP): void;
|
|
108
|
-
}
|
|
109
88
|
|
|
110
|
-
interface NPC {
|
|
111
89
|
/**
|
|
112
90
|
* Remove a certain capability.
|
|
113
91
|
* @realm server
|
|
114
92
|
* @source https://wiki.facepunch.com/gmod/NPC:CapabilitiesRemove
|
|
115
93
|
*/
|
|
116
94
|
CapabilitiesRemove(self: NPC, capabilities: number): void;
|
|
117
|
-
}
|
|
118
95
|
|
|
119
|
-
interface NPC {
|
|
120
96
|
/**
|
|
121
97
|
* Returns the NPC relationship class. This is mostly used to tell NPCs who should be attacking who.
|
|
122
98
|
*
|
|
@@ -125,63 +101,49 @@ interface NPC {
|
|
|
125
101
|
* @source https://wiki.facepunch.com/gmod/NPC:Classify
|
|
126
102
|
*/
|
|
127
103
|
Classify(self: NPC): CLASS;
|
|
128
|
-
}
|
|
129
104
|
|
|
130
|
-
interface NPC {
|
|
131
105
|
/**
|
|
132
106
|
* Resets the [NPC:GetBlockingEntity](https://wiki.facepunch.com/gmod/NPC:GetBlockingEntity).
|
|
133
107
|
* @realm server
|
|
134
108
|
* @source https://wiki.facepunch.com/gmod/NPC:ClearBlockingEntity
|
|
135
109
|
*/
|
|
136
110
|
ClearBlockingEntity(self: NPC): void;
|
|
137
|
-
}
|
|
138
111
|
|
|
139
|
-
interface NPC {
|
|
140
112
|
/**
|
|
141
113
|
* Clears out the specified [Enums/COND](https://wiki.facepunch.com/gmod/Enums/COND) on this NPC.
|
|
142
114
|
* @realm server
|
|
143
115
|
* @source https://wiki.facepunch.com/gmod/NPC:ClearCondition
|
|
144
116
|
*/
|
|
145
117
|
ClearCondition(self: NPC, condition: number): void;
|
|
146
|
-
}
|
|
147
118
|
|
|
148
|
-
interface NPC {
|
|
149
119
|
/**
|
|
150
120
|
* Clears the Enemy from the NPC's memory, effectively forgetting it until met again with either the NPC vision or with [NPC:UpdateEnemyMemory](https://wiki.facepunch.com/gmod/NPC:UpdateEnemyMemory).
|
|
151
121
|
* @realm server
|
|
152
122
|
* @source https://wiki.facepunch.com/gmod/NPC:ClearEnemyMemory
|
|
153
123
|
*/
|
|
154
124
|
ClearEnemyMemory(self: NPC, enemy?: Entity): void;
|
|
155
|
-
}
|
|
156
125
|
|
|
157
|
-
interface NPC {
|
|
158
126
|
/**
|
|
159
127
|
* Clears the NPC's current expression which can be set with [NPC:SetExpression](https://wiki.facepunch.com/gmod/NPC:SetExpression).
|
|
160
128
|
* @realm server
|
|
161
129
|
* @source https://wiki.facepunch.com/gmod/NPC:ClearExpression
|
|
162
130
|
*/
|
|
163
131
|
ClearExpression(self: NPC): void;
|
|
164
|
-
}
|
|
165
132
|
|
|
166
|
-
interface NPC {
|
|
167
133
|
/**
|
|
168
134
|
* Clears the current NPC goal or target.
|
|
169
135
|
* @realm server
|
|
170
136
|
* @source https://wiki.facepunch.com/gmod/NPC:ClearGoal
|
|
171
137
|
*/
|
|
172
138
|
ClearGoal(self: NPC): void;
|
|
173
|
-
}
|
|
174
139
|
|
|
175
|
-
interface NPC {
|
|
176
140
|
/**
|
|
177
141
|
* Stops the current schedule that the NPC is doing.
|
|
178
142
|
* @realm server
|
|
179
143
|
* @source https://wiki.facepunch.com/gmod/NPC:ClearSchedule
|
|
180
144
|
*/
|
|
181
145
|
ClearSchedule(self: NPC): void;
|
|
182
|
-
}
|
|
183
146
|
|
|
184
|
-
interface NPC {
|
|
185
147
|
/**
|
|
186
148
|
* Returns the ID of a given condition by name. Opposite of [NPC:ConditionName](https://wiki.facepunch.com/gmod/NPC:ConditionName).
|
|
187
149
|
*
|
|
@@ -191,18 +153,14 @@ interface NPC {
|
|
|
191
153
|
* @source https://wiki.facepunch.com/gmod/NPC:ConditionID
|
|
192
154
|
*/
|
|
193
155
|
ConditionID(self: NPC, conditionName: string): number;
|
|
194
|
-
}
|
|
195
156
|
|
|
196
|
-
interface NPC {
|
|
197
157
|
/**
|
|
198
158
|
* Translates condition ID to a string. For the opposite process, see [NPC:ConditionID](https://wiki.facepunch.com/gmod/NPC:ConditionID).
|
|
199
159
|
* @realm server
|
|
200
160
|
* @source https://wiki.facepunch.com/gmod/NPC:ConditionName
|
|
201
161
|
*/
|
|
202
162
|
ConditionName(self: NPC, cond: number): string;
|
|
203
|
-
}
|
|
204
163
|
|
|
205
|
-
interface NPC {
|
|
206
164
|
/**
|
|
207
165
|
* Returns the way the NPC "feels" about a given entity. See [NPC:AddEntityRelationship](https://wiki.facepunch.com/gmod/NPC:AddEntityRelationship).
|
|
208
166
|
*
|
|
@@ -214,63 +172,49 @@ interface NPC {
|
|
|
214
172
|
* @source https://wiki.facepunch.com/gmod/NPC:Disposition
|
|
215
173
|
*/
|
|
216
174
|
Disposition(self: NPC, ent: Entity): (D, number);
|
|
217
|
-
}
|
|
218
175
|
|
|
219
|
-
interface NPC {
|
|
220
176
|
/**
|
|
221
177
|
* Forces the NPC to drop the specified weapon.
|
|
222
178
|
* @realm server
|
|
223
179
|
* @source https://wiki.facepunch.com/gmod/NPC:DropWeapon
|
|
224
180
|
*/
|
|
225
181
|
DropWeapon(self: NPC, weapon?: Weapon, target?: Vector, velocity?: Vector): void;
|
|
226
|
-
}
|
|
227
182
|
|
|
228
|
-
interface NPC {
|
|
229
183
|
/**
|
|
230
184
|
* Makes an NPC exit a scripted sequence, if one is playing.
|
|
231
185
|
* @realm server
|
|
232
186
|
* @source https://wiki.facepunch.com/gmod/NPC:ExitScriptedSequence
|
|
233
187
|
*/
|
|
234
188
|
ExitScriptedSequence(self: NPC): void;
|
|
235
|
-
}
|
|
236
189
|
|
|
237
|
-
interface NPC {
|
|
238
190
|
/**
|
|
239
191
|
* Force an NPC to play its Fear sound.
|
|
240
192
|
* @realm server
|
|
241
193
|
* @source https://wiki.facepunch.com/gmod/NPC:FearSound
|
|
242
194
|
*/
|
|
243
195
|
FearSound(self: NPC): void;
|
|
244
|
-
}
|
|
245
196
|
|
|
246
|
-
interface NPC {
|
|
247
197
|
/**
|
|
248
198
|
* Force an NPC to play its FoundEnemy sound.
|
|
249
199
|
* @realm server
|
|
250
200
|
* @source https://wiki.facepunch.com/gmod/NPC:FoundEnemySound
|
|
251
201
|
*/
|
|
252
202
|
FoundEnemySound(self: NPC): void;
|
|
253
|
-
}
|
|
254
203
|
|
|
255
|
-
interface NPC {
|
|
256
204
|
/**
|
|
257
205
|
* Returns the weapon the NPC is currently carrying, or [NULL](https://wiki.facepunch.com/gmod/Global_Variables).
|
|
258
206
|
* @realm shared
|
|
259
207
|
* @source https://wiki.facepunch.com/gmod/NPC:GetActiveWeapon
|
|
260
208
|
*/
|
|
261
209
|
GetActiveWeapon(self: NPC): Entity;
|
|
262
|
-
}
|
|
263
210
|
|
|
264
|
-
interface NPC {
|
|
265
211
|
/**
|
|
266
212
|
* Returns the NPC's current activity.
|
|
267
213
|
* @realm server
|
|
268
214
|
* @source https://wiki.facepunch.com/gmod/NPC:GetActivity
|
|
269
215
|
*/
|
|
270
216
|
GetActivity(self: NPC): number;
|
|
271
|
-
}
|
|
272
217
|
|
|
273
|
-
interface NPC {
|
|
274
218
|
/**
|
|
275
219
|
* Returns the aim vector of the NPC. NPC alternative of [Player:GetAimVector](https://wiki.facepunch.com/gmod/Player:GetAimVector).
|
|
276
220
|
*
|
|
@@ -281,27 +225,21 @@ interface NPC {
|
|
|
281
225
|
* @source https://wiki.facepunch.com/gmod/NPC:GetAimVector
|
|
282
226
|
*/
|
|
283
227
|
GetAimVector(self: NPC): Vector;
|
|
284
|
-
}
|
|
285
228
|
|
|
286
|
-
interface NPC {
|
|
287
229
|
/**
|
|
288
230
|
* Returns the activity to be played when the NPC arrives at its goal
|
|
289
231
|
* @realm server
|
|
290
232
|
* @source https://wiki.facepunch.com/gmod/NPC:GetArrivalActivity
|
|
291
233
|
*/
|
|
292
234
|
GetArrivalActivity(self: NPC): number;
|
|
293
|
-
}
|
|
294
235
|
|
|
295
|
-
interface NPC {
|
|
296
236
|
/**
|
|
297
237
|
* Returns the direction from the NPC origin to its current navigational destination.
|
|
298
238
|
* @realm server
|
|
299
239
|
* @source https://wiki.facepunch.com/gmod/NPC:GetArrivalDirection
|
|
300
240
|
*/
|
|
301
241
|
GetArrivalDirection(self: NPC): Vector;
|
|
302
|
-
}
|
|
303
242
|
|
|
304
|
-
interface NPC {
|
|
305
243
|
/**
|
|
306
244
|
* Returns NPC arrival distance, set by [NPC:SetArrivalDistance](https://wiki.facepunch.com/gmod/NPC:SetArrivalDistance).
|
|
307
245
|
*
|
|
@@ -309,18 +247,14 @@ interface NPC {
|
|
|
309
247
|
* @source https://wiki.facepunch.com/gmod/NPC:GetArrivalDistance
|
|
310
248
|
*/
|
|
311
249
|
GetArrivalDistance(self: NPC): number;
|
|
312
|
-
}
|
|
313
250
|
|
|
314
|
-
interface NPC {
|
|
315
251
|
/**
|
|
316
252
|
* Returns the sequence to be played when the NPC arrives at its goal.
|
|
317
253
|
* @realm server
|
|
318
254
|
* @source https://wiki.facepunch.com/gmod/NPC:GetArrivalSequence
|
|
319
255
|
*/
|
|
320
256
|
GetArrivalSequence(self: NPC): number;
|
|
321
|
-
}
|
|
322
257
|
|
|
323
|
-
interface NPC {
|
|
324
258
|
/**
|
|
325
259
|
* Returns NPC arrival speed, set by [NPC:SetArrivalSpeed](https://wiki.facepunch.com/gmod/NPC:SetArrivalSpeed).
|
|
326
260
|
*
|
|
@@ -328,63 +262,49 @@ interface NPC {
|
|
|
328
262
|
* @source https://wiki.facepunch.com/gmod/NPC:GetArrivalSpeed
|
|
329
263
|
*/
|
|
330
264
|
GetArrivalSpeed(self: NPC): number;
|
|
331
|
-
}
|
|
332
265
|
|
|
333
|
-
interface NPC {
|
|
334
266
|
/**
|
|
335
267
|
* Returns the most dangerous/closest sound hint based on the NPCs location and the types of sounds it can sense.
|
|
336
268
|
* @realm server
|
|
337
269
|
* @source https://wiki.facepunch.com/gmod/NPC:GetBestSoundHint
|
|
338
270
|
*/
|
|
339
271
|
GetBestSoundHint(self: NPC, types: number): table;
|
|
340
|
-
}
|
|
341
272
|
|
|
342
|
-
interface NPC {
|
|
343
273
|
/**
|
|
344
274
|
* Returns the entity blocking the NPC along its path.
|
|
345
275
|
* @realm server
|
|
346
276
|
* @source https://wiki.facepunch.com/gmod/NPC:GetBlockingEntity
|
|
347
277
|
*/
|
|
348
278
|
GetBlockingEntity(self: NPC): Entity;
|
|
349
|
-
}
|
|
350
279
|
|
|
351
|
-
interface NPC {
|
|
352
280
|
/**
|
|
353
281
|
* Returns the goal type for current navigation path.
|
|
354
282
|
* @realm server
|
|
355
283
|
* @source https://wiki.facepunch.com/gmod/NPC:GetCurGoalType
|
|
356
284
|
*/
|
|
357
285
|
GetCurGoalType(self: NPC): number;
|
|
358
|
-
}
|
|
359
286
|
|
|
360
|
-
interface NPC {
|
|
361
287
|
/**
|
|
362
288
|
* Gets the NPC's current waypoint position (where NPC is currently moving towards), if any is available.
|
|
363
289
|
* @realm server
|
|
364
290
|
* @source https://wiki.facepunch.com/gmod/NPC:GetCurWaypointPos
|
|
365
291
|
*/
|
|
366
292
|
GetCurWaypointPos(self: NPC): Vector;
|
|
367
|
-
}
|
|
368
293
|
|
|
369
|
-
interface NPC {
|
|
370
294
|
/**
|
|
371
295
|
* Returns the NPC's current schedule.
|
|
372
296
|
* @realm server
|
|
373
297
|
* @source https://wiki.facepunch.com/gmod/NPC:GetCurrentSchedule
|
|
374
298
|
*/
|
|
375
299
|
GetCurrentSchedule(self: NPC): number;
|
|
376
|
-
}
|
|
377
300
|
|
|
378
|
-
interface NPC {
|
|
379
301
|
/**
|
|
380
302
|
* Returns how proficient (skilled) an NPC is with its current weapon.
|
|
381
303
|
* @realm server
|
|
382
304
|
* @source https://wiki.facepunch.com/gmod/NPC:GetCurrentWeaponProficiency
|
|
383
305
|
*/
|
|
384
306
|
GetCurrentWeaponProficiency(self: NPC): number;
|
|
385
|
-
}
|
|
386
307
|
|
|
387
|
-
interface NPC {
|
|
388
308
|
/**
|
|
389
309
|
* Returns the entity that this NPC is trying to fight.
|
|
390
310
|
*
|
|
@@ -394,18 +314,14 @@ interface NPC {
|
|
|
394
314
|
* @source https://wiki.facepunch.com/gmod/NPC:GetEnemy
|
|
395
315
|
*/
|
|
396
316
|
GetEnemy(self: NPC): NPC;
|
|
397
|
-
}
|
|
398
317
|
|
|
399
|
-
interface NPC {
|
|
400
318
|
/**
|
|
401
319
|
* Returns the first time an NPC's enemy was seen by the NPC.
|
|
402
320
|
* @realm server
|
|
403
321
|
* @source https://wiki.facepunch.com/gmod/NPC:GetEnemyFirstTimeSeen
|
|
404
322
|
*/
|
|
405
323
|
GetEnemyFirstTimeSeen(self: NPC, enemy?: Entity): number;
|
|
406
|
-
}
|
|
407
324
|
|
|
408
|
-
interface NPC {
|
|
409
325
|
/**
|
|
410
326
|
* Returns the last known position of an NPC's enemy.
|
|
411
327
|
*
|
|
@@ -414,9 +330,7 @@ interface NPC {
|
|
|
414
330
|
* @source https://wiki.facepunch.com/gmod/NPC:GetEnemyLastKnownPos
|
|
415
331
|
*/
|
|
416
332
|
GetEnemyLastKnownPos(self: NPC, enemy?: Entity): Vector;
|
|
417
|
-
}
|
|
418
333
|
|
|
419
|
-
interface NPC {
|
|
420
334
|
/**
|
|
421
335
|
* Returns the last seen position of an NPC's enemy.
|
|
422
336
|
*
|
|
@@ -425,81 +339,63 @@ interface NPC {
|
|
|
425
339
|
* @source https://wiki.facepunch.com/gmod/NPC:GetEnemyLastSeenPos
|
|
426
340
|
*/
|
|
427
341
|
GetEnemyLastSeenPos(self: NPC, enemy?: Entity): Vector;
|
|
428
|
-
}
|
|
429
342
|
|
|
430
|
-
interface NPC {
|
|
431
343
|
/**
|
|
432
344
|
* Returns the last time an NPC's enemy was seen by the NPC.
|
|
433
345
|
* @realm server
|
|
434
346
|
* @source https://wiki.facepunch.com/gmod/NPC:GetEnemyLastTimeSeen
|
|
435
347
|
*/
|
|
436
348
|
GetEnemyLastTimeSeen(self: NPC, enemy?: Entity): number;
|
|
437
|
-
}
|
|
438
349
|
|
|
439
|
-
interface NPC {
|
|
440
350
|
/**
|
|
441
351
|
* Returns the expression file the NPC is currently playing.
|
|
442
352
|
* @realm server
|
|
443
353
|
* @source https://wiki.facepunch.com/gmod/NPC:GetExpression
|
|
444
354
|
*/
|
|
445
355
|
GetExpression(self: NPC): string;
|
|
446
|
-
}
|
|
447
356
|
|
|
448
|
-
interface NPC {
|
|
449
357
|
/**
|
|
450
358
|
* Returns the eye direction of the NPC.
|
|
451
359
|
* @realm server
|
|
452
360
|
* @source https://wiki.facepunch.com/gmod/NPC:GetEyeDirection
|
|
453
361
|
*/
|
|
454
362
|
GetEyeDirection(self: NPC): Vector;
|
|
455
|
-
}
|
|
456
363
|
|
|
457
|
-
interface NPC {
|
|
458
364
|
/**
|
|
459
365
|
* Returns the Field Of View of the NPC. See [NPC:SetFOV](https://wiki.facepunch.com/gmod/NPC:SetFOV).
|
|
460
366
|
* @realm server
|
|
461
367
|
* @source https://wiki.facepunch.com/gmod/NPC:GetFOV
|
|
462
368
|
*/
|
|
463
369
|
GetFOV(self: NPC): number;
|
|
464
|
-
}
|
|
465
370
|
|
|
466
|
-
interface NPC {
|
|
467
371
|
/**
|
|
468
372
|
* Returns the position we are trying to reach, if any.
|
|
469
373
|
* @realm server
|
|
470
374
|
* @source https://wiki.facepunch.com/gmod/NPC:GetGoalPos
|
|
471
375
|
*/
|
|
472
376
|
GetGoalPos(self: NPC): Vector;
|
|
473
|
-
}
|
|
474
377
|
|
|
475
|
-
interface NPC {
|
|
476
378
|
/**
|
|
477
379
|
* Returns the entity we are trying to reach, if any.
|
|
478
380
|
* @realm server
|
|
479
381
|
* @source https://wiki.facepunch.com/gmod/NPC:GetGoalTarget
|
|
480
382
|
*/
|
|
481
383
|
GetGoalTarget(self: NPC): Entity;
|
|
482
|
-
}
|
|
483
384
|
|
|
484
|
-
interface NPC {
|
|
485
385
|
/**
|
|
486
386
|
* Returns the 2D head direction of the NPC.
|
|
487
387
|
* @realm server
|
|
488
388
|
* @source https://wiki.facepunch.com/gmod/NPC:GetHeadDirection
|
|
489
389
|
*/
|
|
490
390
|
GetHeadDirection(self: NPC): Vector;
|
|
491
|
-
}
|
|
492
391
|
|
|
493
|
-
interface NPC {
|
|
494
392
|
/**
|
|
495
393
|
* Returns NPCs hull type set by [NPC:SetHullType](https://wiki.facepunch.com/gmod/NPC:SetHullType).
|
|
496
394
|
* @realm server
|
|
497
395
|
* @source https://wiki.facepunch.com/gmod/NPC:GetHullType
|
|
498
396
|
*/
|
|
499
397
|
GetHullType(self: NPC): number;
|
|
500
|
-
}
|
|
501
398
|
|
|
502
|
-
interface NPC {
|
|
503
399
|
/**
|
|
504
400
|
* Returns the ideal activity the NPC currently wants to achieve.
|
|
505
401
|
* **NOTE**: By default, base NPCs will automatically attempt to play a sequence bound to the ideal activity. To prevent ideal activity from overriding NPC's active sequence, set this to `ACT_DO_NOT_DISTURB`.
|
|
@@ -509,45 +405,35 @@ interface NPC {
|
|
|
509
405
|
* @source https://wiki.facepunch.com/gmod/NPC:GetIdealActivity
|
|
510
406
|
*/
|
|
511
407
|
GetIdealActivity(self: NPC): number;
|
|
512
|
-
}
|
|
513
408
|
|
|
514
|
-
interface NPC {
|
|
515
409
|
/**
|
|
516
410
|
* Returns the ideal move acceleration of the NPC.
|
|
517
411
|
* @realm server
|
|
518
412
|
* @source https://wiki.facepunch.com/gmod/NPC:GetIdealMoveAcceleration
|
|
519
413
|
*/
|
|
520
414
|
GetIdealMoveAcceleration(self: NPC): number;
|
|
521
|
-
}
|
|
522
415
|
|
|
523
|
-
interface NPC {
|
|
524
416
|
/**
|
|
525
417
|
* Returns the ideal move speed of the NPC.
|
|
526
418
|
* @realm server
|
|
527
419
|
* @source https://wiki.facepunch.com/gmod/NPC:GetIdealMoveSpeed
|
|
528
420
|
*/
|
|
529
421
|
GetIdealMoveSpeed(self: NPC): number;
|
|
530
|
-
}
|
|
531
422
|
|
|
532
|
-
interface NPC {
|
|
533
423
|
/**
|
|
534
424
|
* Returns the ideal sequence the NPC currently wants to achieve.
|
|
535
425
|
* @realm server
|
|
536
426
|
* @source https://wiki.facepunch.com/gmod/NPC:GetIdealSequence
|
|
537
427
|
*/
|
|
538
428
|
GetIdealSequence(self: NPC): number;
|
|
539
|
-
}
|
|
540
429
|
|
|
541
|
-
interface NPC {
|
|
542
430
|
/**
|
|
543
431
|
* Returns the ideal yaw (left right rotation) for this NPC at this moment.
|
|
544
432
|
* @realm server
|
|
545
433
|
* @source https://wiki.facepunch.com/gmod/NPC:GetIdealYaw
|
|
546
434
|
*/
|
|
547
435
|
GetIdealYaw(self: NPC): number;
|
|
548
|
-
}
|
|
549
436
|
|
|
550
|
-
interface NPC {
|
|
551
437
|
/**
|
|
552
438
|
* Returns all known enemies this NPC has. The enemy table is updated with [NPC:UpdateEnemyMemory](https://wiki.facepunch.com/gmod/NPC:UpdateEnemyMemory) and [NPC:ClearEnemyMemory](https://wiki.facepunch.com/gmod/NPC:ClearEnemyMemory), meaning other entities may be in enemies list even though your NPC doesn't hate it.
|
|
553
439
|
*
|
|
@@ -557,9 +443,7 @@ interface NPC {
|
|
|
557
443
|
* @source https://wiki.facepunch.com/gmod/NPC:GetKnownEnemies
|
|
558
444
|
*/
|
|
559
445
|
GetKnownEnemies(self: NPC): table;
|
|
560
|
-
}
|
|
561
446
|
|
|
562
|
-
interface NPC {
|
|
563
447
|
/**
|
|
564
448
|
* Returns known enemy count of this NPC.
|
|
565
449
|
*
|
|
@@ -569,9 +453,7 @@ interface NPC {
|
|
|
569
453
|
* @source https://wiki.facepunch.com/gmod/NPC:GetKnownEnemyCount
|
|
570
454
|
*/
|
|
571
455
|
GetKnownEnemyCount(self: NPC): number;
|
|
572
|
-
}
|
|
573
456
|
|
|
574
|
-
interface NPC {
|
|
575
457
|
/**
|
|
576
458
|
* Returns the last registered or memorized position of the NPC. When using scheduling, the NPC will focus on navigating to the last position via nodes.
|
|
577
459
|
*
|
|
@@ -581,9 +463,7 @@ interface NPC {
|
|
|
581
463
|
* @source https://wiki.facepunch.com/gmod/NPC:GetLastPosition
|
|
582
464
|
*/
|
|
583
465
|
GetLastPosition(self: NPC): Vector;
|
|
584
|
-
}
|
|
585
466
|
|
|
586
|
-
interface NPC {
|
|
587
467
|
/**
|
|
588
468
|
* Returns [Global.CurTime](https://wiki.facepunch.com/gmod/Global.CurTime) based time since this NPC last received damage from given enemy. The last damage time is set when [NPC:MarkTookDamageFromEnemy](https://wiki.facepunch.com/gmod/NPC:MarkTookDamageFromEnemy) is called.
|
|
589
469
|
*
|
|
@@ -591,36 +471,28 @@ interface NPC {
|
|
|
591
471
|
* @source https://wiki.facepunch.com/gmod/NPC:GetLastTimeTookDamageFromEnemy
|
|
592
472
|
*/
|
|
593
473
|
GetLastTimeTookDamageFromEnemy(self: NPC, enemy?: Entity): number;
|
|
594
|
-
}
|
|
595
474
|
|
|
596
|
-
interface NPC {
|
|
597
475
|
/**
|
|
598
476
|
* Returns NPCs max view distance. An NPC will not be able to see enemies outside of this distance.
|
|
599
477
|
* @realm server
|
|
600
478
|
* @source https://wiki.facepunch.com/gmod/NPC:GetMaxLookDistance
|
|
601
479
|
*/
|
|
602
480
|
GetMaxLookDistance(self: NPC): number;
|
|
603
|
-
}
|
|
604
481
|
|
|
605
|
-
interface NPC {
|
|
606
482
|
/**
|
|
607
483
|
* Returns how far should the NPC look ahead in its route.
|
|
608
484
|
* @realm server
|
|
609
485
|
* @source https://wiki.facepunch.com/gmod/NPC:GetMinMoveCheckDist
|
|
610
486
|
*/
|
|
611
487
|
GetMinMoveCheckDist(self: NPC): number;
|
|
612
|
-
}
|
|
613
488
|
|
|
614
|
-
interface NPC {
|
|
615
489
|
/**
|
|
616
490
|
* Returns how far before the NPC can come to a complete stop.
|
|
617
491
|
* @realm server
|
|
618
492
|
* @source https://wiki.facepunch.com/gmod/NPC:GetMinMoveStopDist
|
|
619
493
|
*/
|
|
620
494
|
GetMinMoveStopDist(self: NPC, minResult?: number): number;
|
|
621
|
-
}
|
|
622
495
|
|
|
623
|
-
interface NPC {
|
|
624
496
|
/**
|
|
625
497
|
* Returns the movement delay for given NPC.
|
|
626
498
|
*
|
|
@@ -630,99 +502,77 @@ interface NPC {
|
|
|
630
502
|
* @source https://wiki.facepunch.com/gmod/NPC:GetMoveDelay
|
|
631
503
|
*/
|
|
632
504
|
GetMoveDelay(self: NPC): number;
|
|
633
|
-
}
|
|
634
505
|
|
|
635
|
-
interface NPC {
|
|
636
506
|
/**
|
|
637
507
|
* Returns the current timestep the internal NPC motor is working on.
|
|
638
508
|
* @realm server
|
|
639
509
|
* @source https://wiki.facepunch.com/gmod/NPC:GetMoveInterval
|
|
640
510
|
*/
|
|
641
511
|
GetMoveInterval(self: NPC): number;
|
|
642
|
-
}
|
|
643
512
|
|
|
644
|
-
interface NPC {
|
|
645
513
|
/**
|
|
646
514
|
* Returns the current move velocity of the NPC.
|
|
647
515
|
* @realm server
|
|
648
516
|
* @source https://wiki.facepunch.com/gmod/NPC:GetMoveVelocity
|
|
649
517
|
*/
|
|
650
518
|
GetMoveVelocity(self: NPC): Vector;
|
|
651
|
-
}
|
|
652
519
|
|
|
653
|
-
interface NPC {
|
|
654
520
|
/**
|
|
655
521
|
* Returns the NPC's current movement activity.
|
|
656
522
|
* @realm server
|
|
657
523
|
* @source https://wiki.facepunch.com/gmod/NPC:GetMovementActivity
|
|
658
524
|
*/
|
|
659
525
|
GetMovementActivity(self: NPC): number;
|
|
660
|
-
}
|
|
661
526
|
|
|
662
|
-
interface NPC {
|
|
663
527
|
/**
|
|
664
528
|
* Returns the index of the sequence the NPC uses to move.
|
|
665
529
|
* @realm server
|
|
666
530
|
* @source https://wiki.facepunch.com/gmod/NPC:GetMovementSequence
|
|
667
531
|
*/
|
|
668
532
|
GetMovementSequence(self: NPC): number;
|
|
669
|
-
}
|
|
670
533
|
|
|
671
|
-
interface NPC {
|
|
672
534
|
/**
|
|
673
535
|
* Returns the NPC's state.
|
|
674
536
|
* @realm server
|
|
675
537
|
* @source https://wiki.facepunch.com/gmod/NPC:GetNPCState
|
|
676
538
|
*/
|
|
677
539
|
GetNPCState(self: NPC): number;
|
|
678
|
-
}
|
|
679
540
|
|
|
680
|
-
interface NPC {
|
|
681
541
|
/**
|
|
682
542
|
* Returns the NPC's navigation type.
|
|
683
543
|
* @realm server
|
|
684
544
|
* @source https://wiki.facepunch.com/gmod/NPC:GetNavType
|
|
685
545
|
*/
|
|
686
546
|
GetNavType(self: NPC): number;
|
|
687
|
-
}
|
|
688
547
|
|
|
689
|
-
interface NPC {
|
|
690
548
|
/**
|
|
691
549
|
* Returns the nearest member of the squad the NPC is in.
|
|
692
550
|
* @realm server
|
|
693
551
|
* @source https://wiki.facepunch.com/gmod/NPC:GetNearestSquadMember
|
|
694
552
|
*/
|
|
695
553
|
GetNearestSquadMember(self: NPC): NPC;
|
|
696
|
-
}
|
|
697
554
|
|
|
698
|
-
interface NPC {
|
|
699
555
|
/**
|
|
700
556
|
* Gets the NPC's next waypoint position, where NPC will be moving after reaching current waypoint, if any is available.
|
|
701
557
|
* @realm server
|
|
702
558
|
* @source https://wiki.facepunch.com/gmod/NPC:GetNextWaypointPos
|
|
703
559
|
*/
|
|
704
560
|
GetNextWaypointPos(self: NPC): Vector;
|
|
705
|
-
}
|
|
706
561
|
|
|
707
|
-
interface NPC {
|
|
708
562
|
/**
|
|
709
563
|
* Returns the distance the NPC is from Target Goal.
|
|
710
564
|
* @realm server
|
|
711
565
|
* @source https://wiki.facepunch.com/gmod/NPC:GetPathDistanceToGoal
|
|
712
566
|
*/
|
|
713
567
|
GetPathDistanceToGoal(self: NPC): number;
|
|
714
|
-
}
|
|
715
568
|
|
|
716
|
-
interface NPC {
|
|
717
569
|
/**
|
|
718
570
|
* Returns the amount of time it will take for the NPC to get to its Target Goal.
|
|
719
571
|
* @realm server
|
|
720
572
|
* @source https://wiki.facepunch.com/gmod/NPC:GetPathTimeToGoal
|
|
721
573
|
*/
|
|
722
574
|
GetPathTimeToGoal(self: NPC): number;
|
|
723
|
-
}
|
|
724
575
|
|
|
725
|
-
interface NPC {
|
|
726
576
|
/**
|
|
727
577
|
* Returns the shooting position of the NPC, i.e. where their bullets would come from, etc.
|
|
728
578
|
*
|
|
@@ -732,18 +582,14 @@ interface NPC {
|
|
|
732
582
|
* @source https://wiki.facepunch.com/gmod/NPC:GetShootPos
|
|
733
583
|
*/
|
|
734
584
|
GetShootPos(self: NPC): Vector;
|
|
735
|
-
}
|
|
736
585
|
|
|
737
|
-
interface NPC {
|
|
738
586
|
/**
|
|
739
587
|
* Returns the current squad name of the NPC, as set via [NPC:SetSquad](https://wiki.facepunch.com/gmod/NPC:SetSquad).
|
|
740
588
|
* @realm server
|
|
741
589
|
* @source https://wiki.facepunch.com/gmod/NPC:GetSquad
|
|
742
590
|
*/
|
|
743
591
|
GetSquad(self: NPC): string;
|
|
744
|
-
}
|
|
745
592
|
|
|
746
|
-
interface NPC {
|
|
747
593
|
/**
|
|
748
594
|
* Returns NPC step height.
|
|
749
595
|
*
|
|
@@ -751,9 +597,7 @@ interface NPC {
|
|
|
751
597
|
* @source https://wiki.facepunch.com/gmod/NPC:GetStepHeight
|
|
752
598
|
*/
|
|
753
599
|
GetStepHeight(self: NPC): number;
|
|
754
|
-
}
|
|
755
600
|
|
|
756
|
-
interface NPC {
|
|
757
601
|
/**
|
|
758
602
|
* Returns the NPC's current target set by [NPC:SetTarget](https://wiki.facepunch.com/gmod/NPC:SetTarget).
|
|
759
603
|
*
|
|
@@ -763,18 +607,14 @@ interface NPC {
|
|
|
763
607
|
* @source https://wiki.facepunch.com/gmod/NPC:GetTarget
|
|
764
608
|
*/
|
|
765
609
|
GetTarget(self: NPC): Entity;
|
|
766
|
-
}
|
|
767
610
|
|
|
768
|
-
interface NPC {
|
|
769
611
|
/**
|
|
770
612
|
* Returns the status of the current task.
|
|
771
613
|
* @realm server
|
|
772
614
|
* @source https://wiki.facepunch.com/gmod/NPC:GetTaskStatus
|
|
773
615
|
*/
|
|
774
616
|
GetTaskStatus(self: NPC): number;
|
|
775
|
-
}
|
|
776
617
|
|
|
777
|
-
interface NPC {
|
|
778
618
|
/**
|
|
779
619
|
* Returns [Global.CurTime](https://wiki.facepunch.com/gmod/Global.CurTime) based time since the enemy was reacquired, meaning it is currently in Line of Sight of the NPC.
|
|
780
620
|
*
|
|
@@ -782,202 +622,156 @@ interface NPC {
|
|
|
782
622
|
* @source https://wiki.facepunch.com/gmod/NPC:GetTimeEnemyLastReacquired
|
|
783
623
|
*/
|
|
784
624
|
GetTimeEnemyLastReacquired(self: NPC, enemy?: Entity): number;
|
|
785
|
-
}
|
|
786
625
|
|
|
787
|
-
interface NPC {
|
|
788
626
|
/**
|
|
789
627
|
* Returns the view offset of the NPC. Set by [NPC:SetViewOffset](https://wiki.facepunch.com/gmod/NPC:SetViewOffset).
|
|
790
628
|
* @realm server
|
|
791
629
|
* @source https://wiki.facepunch.com/gmod/NPC:GetViewOffset
|
|
792
630
|
*/
|
|
793
631
|
GetViewOffset(self: NPC): Vector;
|
|
794
|
-
}
|
|
795
632
|
|
|
796
|
-
interface NPC {
|
|
797
633
|
/**
|
|
798
634
|
* Returns a specific weapon the NPC owns.
|
|
799
635
|
* @realm server
|
|
800
636
|
* @source https://wiki.facepunch.com/gmod/NPC:GetWeapon
|
|
801
637
|
*/
|
|
802
638
|
GetWeapon(self: NPC, _class: string): Weapon;
|
|
803
|
-
}
|
|
804
639
|
|
|
805
|
-
interface NPC {
|
|
806
640
|
/**
|
|
807
641
|
* Returns a table of the NPC's weapons.
|
|
808
642
|
* @realm server
|
|
809
643
|
* @source https://wiki.facepunch.com/gmod/NPC:GetWeapons
|
|
810
644
|
*/
|
|
811
645
|
GetWeapons(self: NPC): Weapon[];
|
|
812
|
-
}
|
|
813
646
|
|
|
814
|
-
interface NPC {
|
|
815
647
|
/**
|
|
816
648
|
* Used to give a weapon to an already spawned NPC.
|
|
817
649
|
* @realm server
|
|
818
650
|
* @source https://wiki.facepunch.com/gmod/NPC:Give
|
|
819
651
|
*/
|
|
820
652
|
Give(self: NPC, weapon: string): Weapon;
|
|
821
|
-
}
|
|
822
653
|
|
|
823
|
-
interface NPC {
|
|
824
654
|
/**
|
|
825
655
|
* Returns whether or not the NPC has the given condition.
|
|
826
656
|
* @realm server
|
|
827
657
|
* @source https://wiki.facepunch.com/gmod/NPC:HasCondition
|
|
828
658
|
*/
|
|
829
659
|
HasCondition(self: NPC, condition: number): boolean;
|
|
830
|
-
}
|
|
831
660
|
|
|
832
|
-
interface NPC {
|
|
833
661
|
/**
|
|
834
662
|
* Polls the enemy memory to check if the given entity has eluded us or not.
|
|
835
663
|
* @realm server
|
|
836
664
|
* @source https://wiki.facepunch.com/gmod/NPC:HasEnemyEluded
|
|
837
665
|
*/
|
|
838
666
|
HasEnemyEluded(self: NPC, enemy?: Entity): boolean;
|
|
839
|
-
}
|
|
840
667
|
|
|
841
|
-
interface NPC {
|
|
842
668
|
/**
|
|
843
669
|
* Polls the enemy memory to check if the NPC has any memory of given enemy.
|
|
844
670
|
* @realm server
|
|
845
671
|
* @source https://wiki.facepunch.com/gmod/NPC:HasEnemyMemory
|
|
846
672
|
*/
|
|
847
673
|
HasEnemyMemory(self: NPC, enemy?: Entity): boolean;
|
|
848
|
-
}
|
|
849
674
|
|
|
850
|
-
interface NPC {
|
|
851
675
|
/**
|
|
852
676
|
* Returns true if the current navigation has an obstacle, this is different from [NPC:GetBlockingEntity](https://wiki.facepunch.com/gmod/NPC:GetBlockingEntity), this is for virtual navigation obstacles put by AI's local navigation system to prevent movement to the marked area, forcing NPC to steer around, [for example](https://github.com/ValveSoftware/source-sdk-2013/blob/master/src/game/server/hl2/npc_playercompanion.cpp#L2897).
|
|
853
677
|
* @realm server
|
|
854
678
|
* @source https://wiki.facepunch.com/gmod/NPC:HasObstacles
|
|
855
679
|
*/
|
|
856
680
|
HasObstacles(self: NPC): boolean;
|
|
857
|
-
}
|
|
858
681
|
|
|
859
|
-
interface NPC {
|
|
860
682
|
/**
|
|
861
683
|
* Force an NPC to play their Idle sound.
|
|
862
684
|
* @realm server
|
|
863
685
|
* @source https://wiki.facepunch.com/gmod/NPC:IdleSound
|
|
864
686
|
*/
|
|
865
687
|
IdleSound(self: NPC): void;
|
|
866
|
-
}
|
|
867
688
|
|
|
868
|
-
interface NPC {
|
|
869
689
|
/**
|
|
870
690
|
* Makes the NPC ignore given entity/enemy until given time.
|
|
871
691
|
* @realm server
|
|
872
692
|
* @source https://wiki.facepunch.com/gmod/NPC:IgnoreEnemyUntil
|
|
873
693
|
*/
|
|
874
694
|
IgnoreEnemyUntil(self: NPC, enemy: Entity, _until: number): void;
|
|
875
|
-
}
|
|
876
695
|
|
|
877
|
-
interface NPC {
|
|
878
696
|
/**
|
|
879
697
|
* Returns whether the NPC is currently crouching or not. Citizens and Combine Soldiers are capable of this behavior by default.
|
|
880
698
|
* @realm server
|
|
881
699
|
* @source https://wiki.facepunch.com/gmod/NPC:IsCrouching
|
|
882
700
|
*/
|
|
883
701
|
IsCrouching(self: NPC): boolean;
|
|
884
|
-
}
|
|
885
702
|
|
|
886
|
-
interface NPC {
|
|
887
703
|
/**
|
|
888
704
|
* Returns whether the current navigational waypoint is the final one.
|
|
889
705
|
* @realm server
|
|
890
706
|
* @source https://wiki.facepunch.com/gmod/NPC:IsCurWaypointGoal
|
|
891
707
|
*/
|
|
892
708
|
IsCurWaypointGoal(self: NPC): boolean;
|
|
893
|
-
}
|
|
894
709
|
|
|
895
|
-
interface NPC {
|
|
896
710
|
/**
|
|
897
711
|
* Returns whether or not the NPC is performing the given schedule.
|
|
898
712
|
* @realm server
|
|
899
713
|
* @source https://wiki.facepunch.com/gmod/NPC:IsCurrentSchedule
|
|
900
714
|
*/
|
|
901
715
|
IsCurrentSchedule(self: NPC, schedule: number): boolean;
|
|
902
|
-
}
|
|
903
716
|
|
|
904
|
-
interface NPC {
|
|
905
717
|
/**
|
|
906
718
|
* Returns whether the NPC is facing their ideal yaw. See [NPC:SetIdealYaw](https://wiki.facepunch.com/gmod/NPC:SetIdealYaw), [NPC:GetIdealYaw](https://wiki.facepunch.com/gmod/NPC:GetIdealYaw) and [NPC:SetIdealYawAndUpdate](https://wiki.facepunch.com/gmod/NPC:SetIdealYawAndUpdate).
|
|
907
719
|
* @realm server
|
|
908
720
|
* @source https://wiki.facepunch.com/gmod/NPC:IsFacingIdealYaw
|
|
909
721
|
*/
|
|
910
722
|
IsFacingIdealYaw(self: NPC): boolean;
|
|
911
|
-
}
|
|
912
723
|
|
|
913
|
-
interface NPC {
|
|
914
724
|
/**
|
|
915
725
|
* Returns whether the NPC has an active goal.
|
|
916
726
|
* @realm server
|
|
917
727
|
* @source https://wiki.facepunch.com/gmod/NPC:IsGoalActive
|
|
918
728
|
*/
|
|
919
729
|
IsGoalActive(self: NPC): boolean;
|
|
920
|
-
}
|
|
921
730
|
|
|
922
|
-
interface NPC {
|
|
923
731
|
/**
|
|
924
732
|
* Tests whether a position or an NPC is in the view cone of the NPC.
|
|
925
733
|
* @realm server
|
|
926
734
|
* @source https://wiki.facepunch.com/gmod/NPC:IsInViewCone
|
|
927
735
|
*/
|
|
928
736
|
IsInViewCone(self: NPC, position: Vector): boolean;
|
|
929
|
-
}
|
|
930
737
|
|
|
931
|
-
interface NPC {
|
|
932
738
|
IsInViewCone(self: NPC, ent: Entity): boolean;
|
|
933
|
-
}
|
|
934
739
|
|
|
935
|
-
interface NPC {
|
|
936
740
|
/**
|
|
937
741
|
* Returns if the current movement is locked on the Yaw axis.
|
|
938
742
|
* @realm server
|
|
939
743
|
* @source https://wiki.facepunch.com/gmod/NPC:IsMoveYawLocked
|
|
940
744
|
*/
|
|
941
745
|
IsMoveYawLocked(self: NPC): boolean;
|
|
942
|
-
}
|
|
943
746
|
|
|
944
|
-
interface NPC {
|
|
945
747
|
/**
|
|
946
748
|
* Returns whether the NPC is moving or not.
|
|
947
749
|
* @realm server
|
|
948
750
|
* @source https://wiki.facepunch.com/gmod/NPC:IsMoving
|
|
949
751
|
*/
|
|
950
752
|
IsMoving(self: NPC): boolean;
|
|
951
|
-
}
|
|
952
753
|
|
|
953
|
-
interface NPC {
|
|
954
754
|
/**
|
|
955
755
|
* Checks if the NPC is running an **ai_goal**. ( e.g. An npc_citizen NPC following the Player. )
|
|
956
756
|
* @realm server
|
|
957
757
|
* @source https://wiki.facepunch.com/gmod/NPC:IsRunningBehavior
|
|
958
758
|
*/
|
|
959
759
|
IsRunningBehavior(self: NPC): boolean;
|
|
960
|
-
}
|
|
961
760
|
|
|
962
|
-
interface NPC {
|
|
963
761
|
/**
|
|
964
762
|
* Returns whether the current NPC is the leader of the squad it is in.
|
|
965
763
|
* @realm server
|
|
966
764
|
* @source https://wiki.facepunch.com/gmod/NPC:IsSquadLeader
|
|
967
765
|
*/
|
|
968
766
|
IsSquadLeader(self: NPC): boolean;
|
|
969
|
-
}
|
|
970
767
|
|
|
971
|
-
interface NPC {
|
|
972
768
|
/**
|
|
973
769
|
* Returns the "forgettable" status for a given enemy, as set by [NPC:SetUnforgettable](https://wiki.facepunch.com/gmod/NPC:SetUnforgettable), or by internal logic of engine NPCs.
|
|
974
770
|
* @realm server
|
|
975
771
|
* @source https://wiki.facepunch.com/gmod/NPC:IsUnforgettable
|
|
976
772
|
*/
|
|
977
773
|
IsUnforgettable(self: NPC, enemy: Entity): boolean;
|
|
978
|
-
}
|
|
979
774
|
|
|
980
|
-
interface NPC {
|
|
981
775
|
/**
|
|
982
776
|
* Returns true if the entity was remembered as unreachable. The memory is updated automatically from following engine tasks if they failed:
|
|
983
777
|
* * TASK_GET_CHASE_PATH_TO_ENEMY
|
|
@@ -990,36 +784,28 @@ interface NPC {
|
|
|
990
784
|
* @source https://wiki.facepunch.com/gmod/NPC:IsUnreachable
|
|
991
785
|
*/
|
|
992
786
|
IsUnreachable(self: NPC, testEntity: Entity): boolean;
|
|
993
|
-
}
|
|
994
787
|
|
|
995
|
-
interface NPC {
|
|
996
788
|
/**
|
|
997
789
|
* Force an NPC to play their LostEnemy sound.
|
|
998
790
|
* @realm server
|
|
999
791
|
* @source https://wiki.facepunch.com/gmod/NPC:LostEnemySound
|
|
1000
792
|
*/
|
|
1001
793
|
LostEnemySound(self: NPC): void;
|
|
1002
|
-
}
|
|
1003
794
|
|
|
1004
|
-
interface NPC {
|
|
1005
795
|
/**
|
|
1006
796
|
* Tries to achieve our ideal animation state, playing any transition sequences that we need to play to get there.
|
|
1007
797
|
* @realm server
|
|
1008
798
|
* @source https://wiki.facepunch.com/gmod/NPC:MaintainActivity
|
|
1009
799
|
*/
|
|
1010
800
|
MaintainActivity(self: NPC): void;
|
|
1011
|
-
}
|
|
1012
801
|
|
|
1013
|
-
interface NPC {
|
|
1014
802
|
/**
|
|
1015
803
|
* Causes the NPC to temporarily forget the current enemy and switch on to a better one.
|
|
1016
804
|
* @realm server
|
|
1017
805
|
* @source https://wiki.facepunch.com/gmod/NPC:MarkEnemyAsEluded
|
|
1018
806
|
*/
|
|
1019
807
|
MarkEnemyAsEluded(self: NPC, enemy?: Entity): void;
|
|
1020
|
-
}
|
|
1021
808
|
|
|
1022
|
-
interface NPC {
|
|
1023
809
|
/**
|
|
1024
810
|
* Marks the NPC as took damage from given entity.
|
|
1025
811
|
*
|
|
@@ -1029,9 +815,7 @@ interface NPC {
|
|
|
1029
815
|
* @source https://wiki.facepunch.com/gmod/NPC:MarkTookDamageFromEnemy
|
|
1030
816
|
*/
|
|
1031
817
|
MarkTookDamageFromEnemy(self: NPC, enemy?: Entity): void;
|
|
1032
|
-
}
|
|
1033
818
|
|
|
1034
|
-
interface NPC {
|
|
1035
819
|
/**
|
|
1036
820
|
* Executes a climb move.
|
|
1037
821
|
*
|
|
@@ -1040,9 +824,7 @@ interface NPC {
|
|
|
1040
824
|
* @source https://wiki.facepunch.com/gmod/NPC:MoveClimbExec
|
|
1041
825
|
*/
|
|
1042
826
|
MoveClimbExec(self: NPC, destination: Vector, dir: Vector, distance: number, yaw: number, left: number): AIMR;
|
|
1043
|
-
}
|
|
1044
827
|
|
|
1045
|
-
interface NPC {
|
|
1046
828
|
/**
|
|
1047
829
|
* Starts a climb move.
|
|
1048
830
|
*
|
|
@@ -1051,9 +833,7 @@ interface NPC {
|
|
|
1051
833
|
* @source https://wiki.facepunch.com/gmod/NPC:MoveClimbStart
|
|
1052
834
|
*/
|
|
1053
835
|
MoveClimbStart(self: NPC, destination: Vector, dir: Vector, distance: number, yaw: number): void;
|
|
1054
|
-
}
|
|
1055
836
|
|
|
1056
|
-
interface NPC {
|
|
1057
837
|
/**
|
|
1058
838
|
* Stops a climb move.
|
|
1059
839
|
*
|
|
@@ -1062,9 +842,7 @@ interface NPC {
|
|
|
1062
842
|
* @source https://wiki.facepunch.com/gmod/NPC:MoveClimbStop
|
|
1063
843
|
*/
|
|
1064
844
|
MoveClimbStop(self: NPC): void;
|
|
1065
|
-
}
|
|
1066
845
|
|
|
1067
|
-
interface NPC {
|
|
1068
846
|
/**
|
|
1069
847
|
* Similar to other `NPC:Move*` functions, invokes internal code to move the NPC to a given location.
|
|
1070
848
|
*
|
|
@@ -1073,9 +851,7 @@ interface NPC {
|
|
|
1073
851
|
* @source https://wiki.facepunch.com/gmod/NPC:MoveGroundStep
|
|
1074
852
|
*/
|
|
1075
853
|
MoveGroundStep(self: NPC, pos: Vector, targetEntity?: Entity, yaw?: number, asFarAsCan?: boolean, testZ?: boolean): number;
|
|
1076
|
-
}
|
|
1077
854
|
|
|
1078
|
-
interface NPC {
|
|
1079
855
|
/**
|
|
1080
856
|
* Executes a jump move.
|
|
1081
857
|
*
|
|
@@ -1084,9 +860,7 @@ interface NPC {
|
|
|
1084
860
|
* @source https://wiki.facepunch.com/gmod/NPC:MoveJumpExec
|
|
1085
861
|
*/
|
|
1086
862
|
MoveJumpExec(self: NPC): AIMR;
|
|
1087
|
-
}
|
|
1088
863
|
|
|
1089
|
-
interface NPC {
|
|
1090
864
|
/**
|
|
1091
865
|
* Starts a jump move.
|
|
1092
866
|
*
|
|
@@ -1095,9 +869,7 @@ interface NPC {
|
|
|
1095
869
|
* @source https://wiki.facepunch.com/gmod/NPC:MoveJumpStart
|
|
1096
870
|
*/
|
|
1097
871
|
MoveJumpStart(self: NPC, vel: Vector): void;
|
|
1098
|
-
}
|
|
1099
872
|
|
|
1100
|
-
interface NPC {
|
|
1101
873
|
/**
|
|
1102
874
|
* Stops a jump move.
|
|
1103
875
|
*
|
|
@@ -1106,9 +878,7 @@ interface NPC {
|
|
|
1106
878
|
* @source https://wiki.facepunch.com/gmod/NPC:MoveJumpStop
|
|
1107
879
|
*/
|
|
1108
880
|
MoveJumpStop(self: NPC): AIMR;
|
|
1109
|
-
}
|
|
1110
881
|
|
|
1111
|
-
interface NPC {
|
|
1112
882
|
/**
|
|
1113
883
|
* Makes the NPC walk toward the given position. The NPC will return to the player after amount of time set by **player_squad_autosummon_time** [ConVar](https://wiki.facepunch.com/gmod/ConVar).
|
|
1114
884
|
*
|
|
@@ -1120,9 +890,7 @@ interface NPC {
|
|
|
1120
890
|
* @source https://wiki.facepunch.com/gmod/NPC:MoveOrder
|
|
1121
891
|
*/
|
|
1122
892
|
MoveOrder(self: NPC, position: Vector): void;
|
|
1123
|
-
}
|
|
1124
893
|
|
|
1125
|
-
interface NPC {
|
|
1126
894
|
/**
|
|
1127
895
|
* Pauses the NPC movement?
|
|
1128
896
|
*
|
|
@@ -1131,9 +899,7 @@ interface NPC {
|
|
|
1131
899
|
* @source https://wiki.facepunch.com/gmod/NPC:MovePause
|
|
1132
900
|
*/
|
|
1133
901
|
MovePause(self: NPC): void;
|
|
1134
|
-
}
|
|
1135
902
|
|
|
1136
|
-
interface NPC {
|
|
1137
903
|
/**
|
|
1138
904
|
* Starts NPC movement?
|
|
1139
905
|
*
|
|
@@ -1142,9 +908,7 @@ interface NPC {
|
|
|
1142
908
|
* @source https://wiki.facepunch.com/gmod/NPC:MoveStart
|
|
1143
909
|
*/
|
|
1144
910
|
MoveStart(self: NPC): void;
|
|
1145
|
-
}
|
|
1146
911
|
|
|
1147
|
-
interface NPC {
|
|
1148
912
|
/**
|
|
1149
913
|
* Stops the NPC movement?
|
|
1150
914
|
*
|
|
@@ -1153,18 +917,14 @@ interface NPC {
|
|
|
1153
917
|
* @source https://wiki.facepunch.com/gmod/NPC:MoveStop
|
|
1154
918
|
*/
|
|
1155
919
|
MoveStop(self: NPC): void;
|
|
1156
|
-
}
|
|
1157
920
|
|
|
1158
|
-
interface NPC {
|
|
1159
921
|
/**
|
|
1160
922
|
* Picks random node around given vector, around specified length, using dir as search direction start. Works similarly to [NPC:NavSetRandomGoal](https://wiki.facepunch.com/gmod/NPC:NavSetRandomGoal), but you can decide any position you want as a search starting point rather than your NPC.
|
|
1161
923
|
* @realm server
|
|
1162
924
|
* @source https://wiki.facepunch.com/gmod/NPC:NavSetGoal
|
|
1163
925
|
*/
|
|
1164
926
|
NavSetGoal(self: NPC, pos: Vector, length: number, dir: Vector): boolean;
|
|
1165
|
-
}
|
|
1166
927
|
|
|
1167
|
-
interface NPC {
|
|
1168
928
|
/**
|
|
1169
929
|
* Creates a path to closest node at given position. This won't actually force the NPC to move.
|
|
1170
930
|
*
|
|
@@ -1176,9 +936,7 @@ interface NPC {
|
|
|
1176
936
|
* @source https://wiki.facepunch.com/gmod/NPC:NavSetGoalPos
|
|
1177
937
|
*/
|
|
1178
938
|
NavSetGoalPos(self: NPC, pos: Vector): boolean;
|
|
1179
|
-
}
|
|
1180
939
|
|
|
1181
|
-
interface NPC {
|
|
1182
940
|
/**
|
|
1183
941
|
* Set the goal target for an NPC.
|
|
1184
942
|
*
|
|
@@ -1189,27 +947,21 @@ interface NPC {
|
|
|
1189
947
|
* @source https://wiki.facepunch.com/gmod/NPC:NavSetGoalTarget
|
|
1190
948
|
*/
|
|
1191
949
|
NavSetGoalTarget(self: NPC, target: Entity, offset?: Vector): boolean;
|
|
1192
|
-
}
|
|
1193
950
|
|
|
1194
|
-
interface NPC {
|
|
1195
951
|
/**
|
|
1196
952
|
* Creates a random path of specified minimum length between a closest start node and random node in the specified direction. This won't actually force the NPC to move.
|
|
1197
953
|
* @realm server
|
|
1198
954
|
* @source https://wiki.facepunch.com/gmod/NPC:NavSetRandomGoal
|
|
1199
955
|
*/
|
|
1200
956
|
NavSetRandomGoal(self: NPC, minPathLength: number, dir: Vector): boolean;
|
|
1201
|
-
}
|
|
1202
957
|
|
|
1203
|
-
interface NPC {
|
|
1204
958
|
/**
|
|
1205
959
|
* Sets a goal in x, y offsets for the NPC to wander to
|
|
1206
960
|
* @realm server
|
|
1207
961
|
* @source https://wiki.facepunch.com/gmod/NPC:NavSetWanderGoal
|
|
1208
962
|
*/
|
|
1209
963
|
NavSetWanderGoal(self: NPC, xOffset: number, yOffset: number): boolean;
|
|
1210
|
-
}
|
|
1211
964
|
|
|
1212
|
-
interface NPC {
|
|
1213
965
|
/**
|
|
1214
966
|
* Forces the NPC to pickup an existing weapon entity. The NPC will not pick up the weapon if they already own a weapon of given type, or if the NPC could not normally have this weapon in their inventory.
|
|
1215
967
|
*
|
|
@@ -1217,45 +969,35 @@ interface NPC {
|
|
|
1217
969
|
* @source https://wiki.facepunch.com/gmod/NPC:PickupWeapon
|
|
1218
970
|
*/
|
|
1219
971
|
PickupWeapon(self: NPC, wep: Weapon): boolean;
|
|
1220
|
-
}
|
|
1221
972
|
|
|
1222
|
-
interface NPC {
|
|
1223
973
|
/**
|
|
1224
974
|
* Forces the NPC to play a sentence from scripts/sentences.txt
|
|
1225
975
|
* @realm server
|
|
1226
976
|
* @source https://wiki.facepunch.com/gmod/NPC:PlaySentence
|
|
1227
977
|
*/
|
|
1228
978
|
PlaySentence(self: NPC, sentence: string, delay: number, volume: number): number;
|
|
1229
|
-
}
|
|
1230
979
|
|
|
1231
|
-
interface NPC {
|
|
1232
980
|
/**
|
|
1233
981
|
* Makes the NPC remember an entity or an enemy as unreachable, for a specified amount of time. Use [NPC:IsUnreachable](https://wiki.facepunch.com/gmod/NPC:IsUnreachable) to check if an entity is still unreachable.
|
|
1234
982
|
* @realm server
|
|
1235
983
|
* @source https://wiki.facepunch.com/gmod/NPC:RememberUnreachable
|
|
1236
984
|
*/
|
|
1237
985
|
RememberUnreachable(self: NPC, ent: Entity, time?: number): void;
|
|
1238
|
-
}
|
|
1239
986
|
|
|
1240
|
-
interface NPC {
|
|
1241
987
|
/**
|
|
1242
988
|
* Removes conditions to ignore for the this NPC.
|
|
1243
989
|
* @realm server
|
|
1244
990
|
* @source https://wiki.facepunch.com/gmod/NPC:RemoveIgnoreConditions
|
|
1245
991
|
*/
|
|
1246
992
|
RemoveIgnoreConditions(self: NPC, conditions?: table): void;
|
|
1247
|
-
}
|
|
1248
993
|
|
|
1249
|
-
interface NPC {
|
|
1250
994
|
/**
|
|
1251
995
|
* Resets the ideal activity of the NPC. See also [NPC:SetIdealActivity](https://wiki.facepunch.com/gmod/NPC:SetIdealActivity).
|
|
1252
996
|
* @realm server
|
|
1253
997
|
* @source https://wiki.facepunch.com/gmod/NPC:ResetIdealActivity
|
|
1254
998
|
*/
|
|
1255
999
|
ResetIdealActivity(self: NPC, act: number): void;
|
|
1256
|
-
}
|
|
1257
1000
|
|
|
1258
|
-
interface NPC {
|
|
1259
1001
|
/**
|
|
1260
1002
|
* Resets all the movement calculations.
|
|
1261
1003
|
*
|
|
@@ -1264,18 +1006,14 @@ interface NPC {
|
|
|
1264
1006
|
* @source https://wiki.facepunch.com/gmod/NPC:ResetMoveCalc
|
|
1265
1007
|
*/
|
|
1266
1008
|
ResetMoveCalc(self: NPC): void;
|
|
1267
|
-
}
|
|
1268
1009
|
|
|
1269
|
-
interface NPC {
|
|
1270
1010
|
/**
|
|
1271
1011
|
* Forces the NPC to switch to a specific weapon the NPC owns. See [NPC:GetWeapons](https://wiki.facepunch.com/gmod/NPC:GetWeapons).
|
|
1272
1012
|
* @realm server
|
|
1273
1013
|
* @source https://wiki.facepunch.com/gmod/NPC:SelectWeapon
|
|
1274
1014
|
*/
|
|
1275
1015
|
SelectWeapon(self: NPC, weapon: string | Weapon): void;
|
|
1276
|
-
}
|
|
1277
1016
|
|
|
1278
|
-
interface NPC {
|
|
1279
1017
|
/**
|
|
1280
1018
|
* Stops any sounds (speech) the NPC is currently playing.
|
|
1281
1019
|
*
|
|
@@ -1285,179 +1023,139 @@ interface NPC {
|
|
|
1285
1023
|
* @source https://wiki.facepunch.com/gmod/NPC:SentenceStop
|
|
1286
1024
|
*/
|
|
1287
1025
|
SentenceStop(self: NPC): void;
|
|
1288
|
-
}
|
|
1289
1026
|
|
|
1290
|
-
interface NPC {
|
|
1291
1027
|
/**
|
|
1292
1028
|
* Sets the NPC's current activity.
|
|
1293
1029
|
* @realm server
|
|
1294
1030
|
* @source https://wiki.facepunch.com/gmod/NPC:SetActivity
|
|
1295
1031
|
*/
|
|
1296
1032
|
SetActivity(self: NPC, act: number): void;
|
|
1297
|
-
}
|
|
1298
1033
|
|
|
1299
|
-
interface NPC {
|
|
1300
1034
|
/**
|
|
1301
1035
|
* @realm server
|
|
1302
1036
|
* @source https://wiki.facepunch.com/gmod/NPC:SetArrivalActivity
|
|
1303
1037
|
*/
|
|
1304
1038
|
SetArrivalActivity(self: NPC, act: number): void;
|
|
1305
|
-
}
|
|
1306
1039
|
|
|
1307
|
-
interface NPC {
|
|
1308
1040
|
/**
|
|
1309
1041
|
* Sets the direction from the NPC origin to its current navigational destination.
|
|
1310
1042
|
* @realm server
|
|
1311
1043
|
* @source https://wiki.facepunch.com/gmod/NPC:SetArrivalDirection
|
|
1312
1044
|
*/
|
|
1313
1045
|
SetArrivalDirection(self: NPC, dir: Vector): void;
|
|
1314
|
-
}
|
|
1315
1046
|
|
|
1316
|
-
interface NPC {
|
|
1317
1047
|
/**
|
|
1318
1048
|
* Sets the distance to goal at which the NPC should stop moving and continue to other business such as doing the rest of their tasks in a schedule.
|
|
1319
1049
|
* @realm server
|
|
1320
1050
|
* @source https://wiki.facepunch.com/gmod/NPC:SetArrivalDistance
|
|
1321
1051
|
*/
|
|
1322
1052
|
SetArrivalDistance(self: NPC, dist: number): void;
|
|
1323
|
-
}
|
|
1324
1053
|
|
|
1325
|
-
interface NPC {
|
|
1326
1054
|
/**
|
|
1327
1055
|
* Sets the sequence to be played when the NPC arrives at its goal.
|
|
1328
1056
|
* @realm server
|
|
1329
1057
|
* @source https://wiki.facepunch.com/gmod/NPC:SetArrivalSequence
|
|
1330
1058
|
*/
|
|
1331
1059
|
SetArrivalSequence(self: NPC, seq: number): void;
|
|
1332
|
-
}
|
|
1333
1060
|
|
|
1334
|
-
interface NPC {
|
|
1335
1061
|
/**
|
|
1336
1062
|
* Sets the arrival speed? of the NPC
|
|
1337
1063
|
* @realm server
|
|
1338
1064
|
* @source https://wiki.facepunch.com/gmod/NPC:SetArrivalSpeed
|
|
1339
1065
|
*/
|
|
1340
1066
|
SetArrivalSpeed(self: NPC, speed: number): void;
|
|
1341
|
-
}
|
|
1342
1067
|
|
|
1343
|
-
interface NPC {
|
|
1344
1068
|
/**
|
|
1345
1069
|
* Sets an NPC condition.
|
|
1346
1070
|
* @realm server
|
|
1347
1071
|
* @source https://wiki.facepunch.com/gmod/NPC:SetCondition
|
|
1348
1072
|
*/
|
|
1349
1073
|
SetCondition(self: NPC, condition: COND): void;
|
|
1350
|
-
}
|
|
1351
1074
|
|
|
1352
|
-
interface NPC {
|
|
1353
1075
|
/**
|
|
1354
1076
|
* Sets the weapon proficiency of an NPC (how skilled an NPC is with its current weapon).
|
|
1355
1077
|
* @realm server
|
|
1356
1078
|
* @source https://wiki.facepunch.com/gmod/NPC:SetCurrentWeaponProficiency
|
|
1357
1079
|
*/
|
|
1358
1080
|
SetCurrentWeaponProficiency(self: NPC, proficiency: number): void;
|
|
1359
|
-
}
|
|
1360
1081
|
|
|
1361
|
-
interface NPC {
|
|
1362
1082
|
/**
|
|
1363
1083
|
* Sets the target for an NPC.
|
|
1364
1084
|
* @realm server
|
|
1365
1085
|
* @source https://wiki.facepunch.com/gmod/NPC:SetEnemy
|
|
1366
1086
|
*/
|
|
1367
1087
|
SetEnemy(self: NPC, enemy: Entity, newenemy?: boolean): void;
|
|
1368
|
-
}
|
|
1369
1088
|
|
|
1370
|
-
interface NPC {
|
|
1371
1089
|
/**
|
|
1372
1090
|
* Sets the NPC's .vcd expression. Similar to [Entity:PlayScene](https://wiki.facepunch.com/gmod/Entity:PlayScene) except the scene is looped until it's interrupted by default NPC behavior or [NPC:ClearExpression](https://wiki.facepunch.com/gmod/NPC:ClearExpression).
|
|
1373
1091
|
* @realm server
|
|
1374
1092
|
* @source https://wiki.facepunch.com/gmod/NPC:SetExpression
|
|
1375
1093
|
*/
|
|
1376
1094
|
SetExpression(self: NPC, m_iszExpressionScene: string): number;
|
|
1377
|
-
}
|
|
1378
1095
|
|
|
1379
|
-
interface NPC {
|
|
1380
1096
|
/**
|
|
1381
1097
|
* Sets the Field Of View of the NPC, for use with such functions as [NPC:IsInViewCone](https://wiki.facepunch.com/gmod/NPC:IsInViewCone). it is also used internally by the NPC for enemy detection, etc.
|
|
1382
1098
|
* @realm server
|
|
1383
1099
|
* @source https://wiki.facepunch.com/gmod/NPC:SetFOV
|
|
1384
1100
|
*/
|
|
1385
1101
|
SetFOV(self: NPC, fov: number): void;
|
|
1386
|
-
}
|
|
1387
1102
|
|
|
1388
|
-
interface NPC {
|
|
1389
1103
|
/**
|
|
1390
1104
|
* Forces given NPC to crouch, if it is able to do so. Only Citizens and Combine Soldiers can by default.
|
|
1391
1105
|
* @realm server
|
|
1392
1106
|
* @source https://wiki.facepunch.com/gmod/NPC:SetForceCrouch
|
|
1393
1107
|
*/
|
|
1394
1108
|
SetForceCrouch(self: NPC, force: boolean): void;
|
|
1395
|
-
}
|
|
1396
1109
|
|
|
1397
|
-
interface NPC {
|
|
1398
1110
|
/**
|
|
1399
1111
|
* Updates the NPC's hull and physics hull in order to match its model scale. [Entity:SetModelScale](https://wiki.facepunch.com/gmod/Entity:SetModelScale) seems to take care of this regardless.
|
|
1400
1112
|
* @realm server
|
|
1401
1113
|
* @source https://wiki.facepunch.com/gmod/NPC:SetHullSizeNormal
|
|
1402
1114
|
*/
|
|
1403
1115
|
SetHullSizeNormal(self: NPC): void;
|
|
1404
|
-
}
|
|
1405
1116
|
|
|
1406
|
-
interface NPC {
|
|
1407
1117
|
/**
|
|
1408
1118
|
* Sets the hull type for the NPC.
|
|
1409
1119
|
* @realm server
|
|
1410
1120
|
* @source https://wiki.facepunch.com/gmod/NPC:SetHullType
|
|
1411
1121
|
*/
|
|
1412
1122
|
SetHullType(self: NPC, hullType: number): void;
|
|
1413
|
-
}
|
|
1414
1123
|
|
|
1415
|
-
interface NPC {
|
|
1416
1124
|
/**
|
|
1417
1125
|
* Sets the ideal activity the NPC currently wants to achieve. This is most useful for custom SNPCs.
|
|
1418
1126
|
* @realm server
|
|
1419
1127
|
* @source https://wiki.facepunch.com/gmod/NPC:SetIdealActivity
|
|
1420
1128
|
*/
|
|
1421
1129
|
SetIdealActivity(self: NPC, arg0: number): void;
|
|
1422
|
-
}
|
|
1423
1130
|
|
|
1424
|
-
interface NPC {
|
|
1425
1131
|
/**
|
|
1426
1132
|
* Sets the ideal sequence the NPC currently wants to achieve. This is most useful for custom SNPCs.
|
|
1427
1133
|
* @realm server
|
|
1428
1134
|
* @source https://wiki.facepunch.com/gmod/NPC:SetIdealSequence
|
|
1429
1135
|
*/
|
|
1430
1136
|
SetIdealSequence(self: NPC, sequenceId: number): void;
|
|
1431
|
-
}
|
|
1432
1137
|
|
|
1433
|
-
interface NPC {
|
|
1434
1138
|
/**
|
|
1435
1139
|
* Sets the ideal yaw angle (left-right rotation) for the NPC. Does not actually force the NPC to start turning in that direction. See [NPC:UpdateYaw](https://wiki.facepunch.com/gmod/NPC:UpdateYaw), [NPC:GetIdealYaw](https://wiki.facepunch.com/gmod/NPC:GetIdealYaw) and [NPC:SetIdealYawAndUpdate](https://wiki.facepunch.com/gmod/NPC:SetIdealYawAndUpdate).
|
|
1436
1140
|
* @realm server
|
|
1437
1141
|
* @source https://wiki.facepunch.com/gmod/NPC:SetIdealYaw
|
|
1438
1142
|
*/
|
|
1439
1143
|
SetIdealYaw(self: NPC, angle: number): void;
|
|
1440
|
-
}
|
|
1441
1144
|
|
|
1442
|
-
interface NPC {
|
|
1443
1145
|
/**
|
|
1444
1146
|
* Sets the ideal yaw angle (left-right rotation) for the NPC and forces them to turn to that angle.
|
|
1445
1147
|
* @realm server
|
|
1446
1148
|
* @source https://wiki.facepunch.com/gmod/NPC:SetIdealYawAndUpdate
|
|
1447
1149
|
*/
|
|
1448
1150
|
SetIdealYawAndUpdate(self: NPC, angle: number, speed?: number): void;
|
|
1449
|
-
}
|
|
1450
1151
|
|
|
1451
|
-
interface NPC {
|
|
1452
1152
|
/**
|
|
1453
1153
|
* Sets conditions to ignore, which would normally interrupt an Engine-based schedule. Specified conditions will still be set, will call [ENTITY:OnCondition](https://wiki.facepunch.com/gmod/ENTITY:OnCondition) and can be returned by [NPC:HasCondition](https://wiki.facepunch.com/gmod/NPC:HasCondition), but they will no longer interrupt the Engine schedule.
|
|
1454
1154
|
* @realm server
|
|
1455
1155
|
* @source https://wiki.facepunch.com/gmod/NPC:SetIgnoreConditions
|
|
1456
1156
|
*/
|
|
1457
1157
|
SetIgnoreConditions(self: NPC, conditions: table, size: number): void;
|
|
1458
|
-
}
|
|
1459
1158
|
|
|
1460
|
-
interface NPC {
|
|
1461
1159
|
/**
|
|
1462
1160
|
* Sets the last registered or memorized position for this NPC. When using scheduling, the NPC will focus on navigating to the last position via nodes.
|
|
1463
1161
|
*
|
|
@@ -1468,27 +1166,21 @@ interface NPC {
|
|
|
1468
1166
|
* @source https://wiki.facepunch.com/gmod/NPC:SetLastPosition
|
|
1469
1167
|
*/
|
|
1470
1168
|
SetLastPosition(self: NPC, position: Vector): void;
|
|
1471
|
-
}
|
|
1472
1169
|
|
|
1473
|
-
interface NPC {
|
|
1474
1170
|
/**
|
|
1475
1171
|
* Sets NPC's max view distance. An NPC will not be able to see enemies outside of this distance.
|
|
1476
1172
|
* @realm server
|
|
1477
1173
|
* @source https://wiki.facepunch.com/gmod/NPC:SetMaxLookDistance
|
|
1478
1174
|
*/
|
|
1479
1175
|
SetMaxLookDistance(self: NPC, dist: number): void;
|
|
1480
|
-
}
|
|
1481
1176
|
|
|
1482
|
-
interface NPC {
|
|
1483
1177
|
/**
|
|
1484
1178
|
* Sets how long to try rebuilding path before failing task.
|
|
1485
1179
|
* @realm server
|
|
1486
1180
|
* @source https://wiki.facepunch.com/gmod/NPC:SetMaxRouteRebuildTime
|
|
1487
1181
|
*/
|
|
1488
1182
|
SetMaxRouteRebuildTime(self: NPC, time: number): void;
|
|
1489
|
-
}
|
|
1490
1183
|
|
|
1491
|
-
interface NPC {
|
|
1492
1184
|
/**
|
|
1493
1185
|
* Sets the movement delay for given NPC.
|
|
1494
1186
|
*
|
|
@@ -1498,45 +1190,35 @@ interface NPC {
|
|
|
1498
1190
|
* @source https://wiki.facepunch.com/gmod/NPC:SetMoveDelay
|
|
1499
1191
|
*/
|
|
1500
1192
|
SetMoveDelay(self: NPC, delay: number): void;
|
|
1501
|
-
}
|
|
1502
1193
|
|
|
1503
|
-
interface NPC {
|
|
1504
1194
|
/**
|
|
1505
1195
|
* Sets the timestep the internal NPC motor is working on.
|
|
1506
1196
|
* @realm server
|
|
1507
1197
|
* @source https://wiki.facepunch.com/gmod/NPC:SetMoveInterval
|
|
1508
1198
|
*/
|
|
1509
1199
|
SetMoveInterval(self: NPC, time: number): void;
|
|
1510
|
-
}
|
|
1511
1200
|
|
|
1512
|
-
interface NPC {
|
|
1513
1201
|
/**
|
|
1514
1202
|
* Sets the move velocity of the NPC
|
|
1515
1203
|
* @realm server
|
|
1516
1204
|
* @source https://wiki.facepunch.com/gmod/NPC:SetMoveVelocity
|
|
1517
1205
|
*/
|
|
1518
1206
|
SetMoveVelocity(self: NPC, vel: Vector): void;
|
|
1519
|
-
}
|
|
1520
1207
|
|
|
1521
|
-
interface NPC {
|
|
1522
1208
|
/**
|
|
1523
1209
|
* Sets whether the current movement should locked on the Yaw axis or not.
|
|
1524
1210
|
* @realm server
|
|
1525
1211
|
* @source https://wiki.facepunch.com/gmod/NPC:SetMoveYawLocked
|
|
1526
1212
|
*/
|
|
1527
1213
|
SetMoveYawLocked(self: NPC, lock: boolean): void;
|
|
1528
|
-
}
|
|
1529
1214
|
|
|
1530
|
-
interface NPC {
|
|
1531
1215
|
/**
|
|
1532
1216
|
* Sets the activity the NPC uses when it moves.
|
|
1533
1217
|
* @realm server
|
|
1534
1218
|
* @source https://wiki.facepunch.com/gmod/NPC:SetMovementActivity
|
|
1535
1219
|
*/
|
|
1536
1220
|
SetMovementActivity(self: NPC, activity: number): void;
|
|
1537
|
-
}
|
|
1538
1221
|
|
|
1539
|
-
interface NPC {
|
|
1540
1222
|
/**
|
|
1541
1223
|
* Sets the sequence the NPC navigation path uses for speed calculation. Doesn't seem to have any visible effect on NPC movement or actively playing sequence.
|
|
1542
1224
|
*
|
|
@@ -1546,36 +1228,28 @@ interface NPC {
|
|
|
1546
1228
|
* @source https://wiki.facepunch.com/gmod/NPC:SetMovementSequence
|
|
1547
1229
|
*/
|
|
1548
1230
|
SetMovementSequence(self: NPC, sequenceId: number): void;
|
|
1549
|
-
}
|
|
1550
1231
|
|
|
1551
|
-
interface NPC {
|
|
1552
1232
|
/**
|
|
1553
1233
|
* Sets the state the NPC is in to help it decide on a ideal schedule.
|
|
1554
1234
|
* @realm server
|
|
1555
1235
|
* @source https://wiki.facepunch.com/gmod/NPC:SetNPCState
|
|
1556
1236
|
*/
|
|
1557
1237
|
SetNPCState(self: NPC, state: number): void;
|
|
1558
|
-
}
|
|
1559
1238
|
|
|
1560
|
-
interface NPC {
|
|
1561
1239
|
/**
|
|
1562
1240
|
* Sets the navigation type of the NPC.
|
|
1563
1241
|
* @realm server
|
|
1564
1242
|
* @source https://wiki.facepunch.com/gmod/NPC:SetNavType
|
|
1565
1243
|
*/
|
|
1566
1244
|
SetNavType(self: NPC, navtype: number): void;
|
|
1567
|
-
}
|
|
1568
1245
|
|
|
1569
|
-
interface NPC {
|
|
1570
1246
|
/**
|
|
1571
1247
|
* Sets the NPC's current schedule.
|
|
1572
1248
|
* @realm server
|
|
1573
1249
|
* @source https://wiki.facepunch.com/gmod/NPC:SetSchedule
|
|
1574
1250
|
*/
|
|
1575
1251
|
SetSchedule(self: NPC, schedule: number): void;
|
|
1576
|
-
}
|
|
1577
1252
|
|
|
1578
|
-
interface NPC {
|
|
1579
1253
|
/**
|
|
1580
1254
|
* Assigns the NPC to a new squad. A squad can have up to 16 NPCs. NPCs in a single squad should be friendly to each other.
|
|
1581
1255
|
*
|
|
@@ -1587,9 +1261,7 @@ interface NPC {
|
|
|
1587
1261
|
* @source https://wiki.facepunch.com/gmod/NPC:SetSquad
|
|
1588
1262
|
*/
|
|
1589
1263
|
SetSquad(self: NPC, name?: string): void;
|
|
1590
|
-
}
|
|
1591
1264
|
|
|
1592
|
-
interface NPC {
|
|
1593
1265
|
/**
|
|
1594
1266
|
* Sets the SNPC step height.
|
|
1595
1267
|
*
|
|
@@ -1600,36 +1272,28 @@ interface NPC {
|
|
|
1600
1272
|
* @source https://wiki.facepunch.com/gmod/NPC:SetStepHeight
|
|
1601
1273
|
*/
|
|
1602
1274
|
SetStepHeight(self: NPC, height: number): void;
|
|
1603
|
-
}
|
|
1604
1275
|
|
|
1605
|
-
interface NPC {
|
|
1606
1276
|
/**
|
|
1607
1277
|
* Sets the NPC's target. This is used in some engine schedules.
|
|
1608
1278
|
* @realm server
|
|
1609
1279
|
* @source https://wiki.facepunch.com/gmod/NPC:SetTarget
|
|
1610
1280
|
*/
|
|
1611
1281
|
SetTarget(self: NPC, entity: Entity): void;
|
|
1612
|
-
}
|
|
1613
1282
|
|
|
1614
|
-
interface NPC {
|
|
1615
1283
|
/**
|
|
1616
1284
|
* Sets the status of the current task.
|
|
1617
1285
|
* @realm server
|
|
1618
1286
|
* @source https://wiki.facepunch.com/gmod/NPC:SetTaskStatus
|
|
1619
1287
|
*/
|
|
1620
1288
|
SetTaskStatus(self: NPC, status: number): void;
|
|
1621
|
-
}
|
|
1622
1289
|
|
|
1623
|
-
interface NPC {
|
|
1624
1290
|
/**
|
|
1625
1291
|
* Sets given entity as an unforgettable enemy. The state can be retrieved via [NPC:IsUnforgettable](https://wiki.facepunch.com/gmod/NPC:IsUnforgettable).
|
|
1626
1292
|
* @realm server
|
|
1627
1293
|
* @source https://wiki.facepunch.com/gmod/NPC:SetUnforgettable
|
|
1628
1294
|
*/
|
|
1629
1295
|
SetUnforgettable(self: NPC, enemy: Entity, set?: boolean): void;
|
|
1630
|
-
}
|
|
1631
1296
|
|
|
1632
|
-
interface NPC {
|
|
1633
1297
|
/**
|
|
1634
1298
|
* Sets the view offset of the NPC. Player alternative of [Player:SetViewOffset](https://wiki.facepunch.com/gmod/Player:SetViewOffset).
|
|
1635
1299
|
*
|
|
@@ -1638,18 +1302,14 @@ interface NPC {
|
|
|
1638
1302
|
* @source https://wiki.facepunch.com/gmod/NPC:SetViewOffset
|
|
1639
1303
|
*/
|
|
1640
1304
|
SetViewOffset(self: NPC, arg0: Vector): void;
|
|
1641
|
-
}
|
|
1642
1305
|
|
|
1643
|
-
interface NPC {
|
|
1644
1306
|
/**
|
|
1645
1307
|
* Resets the NPC's movement animation and velocity. Does not actually stop the NPC from moving.
|
|
1646
1308
|
* @realm server
|
|
1647
1309
|
* @source https://wiki.facepunch.com/gmod/NPC:StopMoving
|
|
1648
1310
|
*/
|
|
1649
1311
|
StopMoving(self: NPC, immediate?: boolean): void;
|
|
1650
|
-
}
|
|
1651
1312
|
|
|
1652
|
-
interface NPC {
|
|
1653
1313
|
/**
|
|
1654
1314
|
* Cancels [NPC:MoveOrder](https://wiki.facepunch.com/gmod/NPC:MoveOrder) basically.
|
|
1655
1315
|
*
|
|
@@ -1661,9 +1321,7 @@ interface NPC {
|
|
|
1661
1321
|
* @source https://wiki.facepunch.com/gmod/NPC:TargetOrder
|
|
1662
1322
|
*/
|
|
1663
1323
|
TargetOrder(self: NPC, target: Entity): void;
|
|
1664
|
-
}
|
|
1665
1324
|
|
|
1666
|
-
interface NPC {
|
|
1667
1325
|
/**
|
|
1668
1326
|
* Marks the current NPC task as completed.
|
|
1669
1327
|
*
|
|
@@ -1673,9 +1331,7 @@ interface NPC {
|
|
|
1673
1331
|
* @source https://wiki.facepunch.com/gmod/NPC:TaskComplete
|
|
1674
1332
|
*/
|
|
1675
1333
|
TaskComplete(self: NPC): void;
|
|
1676
|
-
}
|
|
1677
1334
|
|
|
1678
|
-
interface NPC {
|
|
1679
1335
|
/**
|
|
1680
1336
|
* Marks the current NPC task as failed.
|
|
1681
1337
|
*
|
|
@@ -1685,36 +1341,28 @@ interface NPC {
|
|
|
1685
1341
|
* @source https://wiki.facepunch.com/gmod/NPC:TaskFail
|
|
1686
1342
|
*/
|
|
1687
1343
|
TaskFail(self: NPC, failReason: string): void;
|
|
1688
|
-
}
|
|
1689
1344
|
|
|
1690
|
-
interface NPC {
|
|
1691
1345
|
/**
|
|
1692
1346
|
* Force the NPC to update information on the supplied enemy, as if it had line of sight to it.
|
|
1693
1347
|
* @realm server
|
|
1694
1348
|
* @source https://wiki.facepunch.com/gmod/NPC:UpdateEnemyMemory
|
|
1695
1349
|
*/
|
|
1696
1350
|
UpdateEnemyMemory(self: NPC, enemy: Entity, pos: Vector): void;
|
|
1697
|
-
}
|
|
1698
1351
|
|
|
1699
|
-
interface NPC {
|
|
1700
1352
|
/**
|
|
1701
1353
|
* Updates the turn activity. Basically applies the turn animations depending on the current turn yaw.
|
|
1702
1354
|
* @realm server
|
|
1703
1355
|
* @source https://wiki.facepunch.com/gmod/NPC:UpdateTurnActivity
|
|
1704
1356
|
*/
|
|
1705
1357
|
UpdateTurnActivity(self: NPC): void;
|
|
1706
|
-
}
|
|
1707
1358
|
|
|
1708
|
-
interface NPC {
|
|
1709
1359
|
/**
|
|
1710
1360
|
* Forces the NPC to turn to their ideal yaw angle. See [NPC:SetIdealYaw](https://wiki.facepunch.com/gmod/NPC:SetIdealYaw) and [NPC:SetIdealYawAndUpdate](https://wiki.facepunch.com/gmod/NPC:SetIdealYawAndUpdate).
|
|
1711
1361
|
* @realm server
|
|
1712
1362
|
* @source https://wiki.facepunch.com/gmod/NPC:UpdateYaw
|
|
1713
1363
|
*/
|
|
1714
1364
|
UpdateYaw(self: NPC, speed?: number): void;
|
|
1715
|
-
}
|
|
1716
1365
|
|
|
1717
|
-
interface NPC {
|
|
1718
1366
|
/**
|
|
1719
1367
|
* **NOTE**: This function only works on `ai` type [SENTs](https://wiki.facepunch.com/gmod/Scripted_Entities).
|
|
1720
1368
|
*
|
|
@@ -1723,9 +1371,7 @@ interface NPC {
|
|
|
1723
1371
|
* @source https://wiki.facepunch.com/gmod/NPC:UseActBusyBehavior
|
|
1724
1372
|
*/
|
|
1725
1373
|
UseActBusyBehavior(self: NPC): boolean;
|
|
1726
|
-
}
|
|
1727
1374
|
|
|
1728
|
-
interface NPC {
|
|
1729
1375
|
/**
|
|
1730
1376
|
* Enables the AI's [Assault Behavior](https://developer.valvesoftware.com/wiki/Assault "Assault Behavior") when an `ai_goal_assault` is set for this SENT.
|
|
1731
1377
|
* **NOTE**: This function only works on `ai` type [SENTs](https://wiki.facepunch.com/gmod/Scripted_Entities).
|
|
@@ -1735,9 +1381,7 @@ interface NPC {
|
|
|
1735
1381
|
* @source https://wiki.facepunch.com/gmod/NPC:UseAssaultBehavior
|
|
1736
1382
|
*/
|
|
1737
1383
|
UseAssaultBehavior(self: NPC): boolean;
|
|
1738
|
-
}
|
|
1739
1384
|
|
|
1740
|
-
interface NPC {
|
|
1741
1385
|
/**
|
|
1742
1386
|
* **NOTE**: This function only works on `ai` type [SENTs](https://wiki.facepunch.com/gmod/Scripted_Entities).
|
|
1743
1387
|
*
|
|
@@ -1746,9 +1390,7 @@ interface NPC {
|
|
|
1746
1390
|
* @source https://wiki.facepunch.com/gmod/NPC:UseFollowBehavior
|
|
1747
1391
|
*/
|
|
1748
1392
|
UseFollowBehavior(self: NPC): boolean;
|
|
1749
|
-
}
|
|
1750
1393
|
|
|
1751
|
-
interface NPC {
|
|
1752
1394
|
/**
|
|
1753
1395
|
* Orders the SNPC to control any nearby `func_tank`s looking for an NPC to operate itself, if available.
|
|
1754
1396
|
* **NOTE**: This function only works on `ai` type [SENTs](https://wiki.facepunch.com/gmod/Scripted_Entities).
|
|
@@ -1758,9 +1400,7 @@ interface NPC {
|
|
|
1758
1400
|
* @source https://wiki.facepunch.com/gmod/NPC:UseFuncTankBehavior
|
|
1759
1401
|
*/
|
|
1760
1402
|
UseFuncTankBehavior(self: NPC): boolean;
|
|
1761
|
-
}
|
|
1762
1403
|
|
|
1763
|
-
interface NPC {
|
|
1764
1404
|
/**
|
|
1765
1405
|
* Enables the AI's [Lead Behavior](https://developer.valvesoftware.com/wiki/ai_goal_lead "Lead Behavior") when an `ai_goal_lead` is set for this SENT.
|
|
1766
1406
|
* **NOTE**: This function only works on `ai` type [SENTs](https://wiki.facepunch.com/gmod/Scripted_Entities).
|
|
@@ -1770,9 +1410,7 @@ interface NPC {
|
|
|
1770
1410
|
* @source https://wiki.facepunch.com/gmod/NPC:UseLeadBehavior
|
|
1771
1411
|
*/
|
|
1772
1412
|
UseLeadBehavior(self: NPC): boolean;
|
|
1773
|
-
}
|
|
1774
1413
|
|
|
1775
|
-
interface NPC {
|
|
1776
1414
|
/**
|
|
1777
1415
|
* Undoes the other `Use*Behavior` functions.
|
|
1778
1416
|
*
|
|
@@ -1784,4 +1422,3 @@ interface NPC {
|
|
|
1784
1422
|
*/
|
|
1785
1423
|
UseNoBehavior(self: NPC): void;
|
|
1786
1424
|
}
|
|
1787
|
-
|