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