Template:I BaseNPC: Difference between revisions
Jump to navigation
Jump to search
Kestrelguy (talk | contribs) m (updated template usage.) |
Kestrelguy (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
{{lang|{{FULLPAGENAME}}}} | {{lang|{{FULLPAGENAME}}}} | ||
{{ | {{documentation}} | ||
< | <onlyinclude><includeonly>{{ScrollBox|title=BaseNPC|noscroll={{{noscroll|}}}| | ||
{{IO|AddHealth|param=int|since=EP2}} | {{IO|AddHealth|param=int|since=EP2}} | ||
{{IO|RemoveHealth|Add to or remove from the NPC's health.|param=int|since=EP2}} | {{IO|RemoveHealth|Add to or remove from the NPC's health.|param=int|since=EP2}} | ||
Line 17: | Line 17: | ||
{{IO|IgnoreDangerSounds|Ignore danger sounds for the specified number of seconds.|param=float}} | {{IO|IgnoreDangerSounds|Ignore danger sounds for the specified number of seconds.|param=float}} | ||
{{IO|physdamagescale|Scales the damage taken when this character is hit by a physics object. 0 means this feature is disabled for backwards compatibility.|param=float}} | {{IO|physdamagescale|Scales the damage taken when this character is hit by a physics object. 0 means this feature is disabled for backwards compatibility.|param=float}} | ||
{{IO|SetBodyGroup|HACK: Sets this NPC's body group (from 0–n).|param=int}}{{#ifeq: base | {{{ | {{IO|SetBodyGroup|HACK: Sets this NPC's body group (from 0–n).|param=int}}{{#ifeq: base | {{{branch|base}}} | | ||
{{IO|SetMaxLookDistance|Sets the maximum look distance for the NPC. Defaults are 2048 and 6000 for long range NPCs.|param=float|only=GMOD}} }} | {{IO|SetMaxLookDistance|Sets the maximum look distance for the NPC. Defaults are 2048 and 6000 for long range NPCs.|param=float|only=GMOD}} }} | ||
{{IO|SetRelationship <[[string]]{{!}}[[targetname]] or [[classname]]> <[[string]]{{!}}disposition> <[[int]]{{!}}rank>|Changes whether this NPC likes or dislikes certain others. Used like the {{ent|ai_relationship}} entity, with this NPC as the subject. | {{IO|SetRelationship <[[string]]{{!}}[[targetname]] or [[classname]]> <[[string]]{{!}}disposition> <[[int]]{{!}}rank>|Changes whether this NPC likes or dislikes certain others. Used like the {{ent|ai_relationship}} entity, with this NPC as the subject. | ||
Line 27: | Line 27: | ||
{{IO|SetSquad|Change the name of this NPC's [[Squads|squad]]. Leaving the parameter blank will remove the NPC from any existing squad.|param=string}} | {{IO|SetSquad|Change the name of this NPC's [[Squads|squad]]. Leaving the parameter blank will remove the NPC from any existing squad.|param=string}} | ||
{{IO|StartScripting}} | {{IO|StartScripting}} | ||
{{IO|StopScripting|Enter/exit scripting state, where NPCs ignore a variety of stimulus that would make them break out of their scripts. They ignore danger sounds, ignore {{ent|use|alt=+ | {{IO|StopScripting|Enter/exit scripting state, where NPCs ignore a variety of stimulus that would make them break out of their scripts. They ignore danger sounds, ignore {{ent|use|alt=+Use}}, don't idle speak or respond to other NPCs' idle speech, and so on.}} | ||
{{IO|Wake|Wakes up the NPC if it is sleeping.}} | {{IO|Wake|Wakes up the NPC if it is sleeping.}} | ||
{{#switch: {{{ | {{#switch: {{{branch}}} | ||
|base={{I BaseEntity|noscroll=1|base=1}} | |base={{I BaseEntity|noscroll=1|base=1}} | ||
{{I BaseAnimating|noscroll=1}} | {{I BaseAnimating|noscroll=1|tf2=1|portal2=}} | ||
|l4d={{I BaseEntity|noscroll=1|l4d2=1}} | |l4d={{I BaseEntity|noscroll=1|l4d2=1}} | ||
{{I BaseAnimating|noscroll=1}} | {{I BaseAnimating|noscroll=1|tf2=|portal2=}} | ||
|as={{I BaseEntity|noscroll=1|as=1}} | |as={{I BaseEntity|noscroll=1|as=1}} | ||
{{I BaseAnimating|noscroll=1}} | {{I BaseAnimating|noscroll=1|tf2=|portal2=}} | ||
|portal2={{I BaseEntity|noscroll=1|as=1}} | |portal2={{I BaseEntity|noscroll=1|as=1}} | ||
{{I BaseAnimating|noscroll=1|portal2=1}} | {{I BaseAnimating|noscroll=1|portal2=1|tf2=}} | ||
|{{I BaseEntity|noscroll=1}} | |{{I BaseEntity|noscroll=1}} | ||
{{I BaseAnimating|noscroll | {{I BaseAnimating|noscroll=1}} }} | ||
{{I DamageFilter}} }}</onlyinclude> | {{I DamageFilter}} }}</onlyinclude></includeonly> |
Revision as of 19:49, 12 October 2022
The above documentation is transcluded from Template:I BaseNPC/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.