Base boss: Difference between revisions
Jump to navigation
Jump to search

Tip:This entity can be used for a moving bot template via VScript, see the example.
Warning:The default step height of this entity is 100, so if driven by NextBot locomotion it can have issues with elevations. This can be fixed by lowering the height via
mNo edit summary |
(Add SetStepHeight and SetMaxJumpHeight inputs, and link to VScript example) |
||
Line 7: | Line 7: | ||
* Plays sounds to client when it gets damaged | * Plays sounds to client when it gets damaged | ||
{{ent|base_boss}} itself was originally intended for the now-scrapped {{tfwiki|Raid}} gamemode. By itself, it is static and does not perform anything; however, it is still of use in setting up a custom hitbox for any custom static NPC bosses. | {{ent|base_boss}} itself was originally intended for the now-scrapped {{tfwiki|Raid}} gamemode. By itself, it is static and does not perform anything; however, it is still of use in setting up a custom hitbox for any custom static NPC bosses. | ||
{{tip|This entity can be used for a moving bot template via [[VScript]], see [[Team_Fortress_2/Scripting/VScript_Examples/en#Creating_Bots_That_Use_the_Navmesh|the example]].}} | |||
{{warning|The default step height of this entity is 100, so if driven by NextBot locomotion it can have issues with elevations. This can be fixed by lowering the height via <code>SetStepHeight</code> input.}} | |||
{{code class|CTFBaseBoss|tf_base_boss.cpp}} | {{code class|CTFBaseBoss|tf_base_boss.cpp}} | ||
Line 22: | Line 24: | ||
{{IO|RemoveHealth|Subtract this amount of health from the entity.|param=int}} | {{IO|RemoveHealth|Subtract this amount of health from the entity.|param=int}} | ||
{{IO|SetSpeed|Sets this entity's speed to this value.|param=int}} | {{IO|SetSpeed|Sets this entity's speed to this value.|param=int}} | ||
{{IO|SetStepHeight|Sets maximum height of steps that the entity can climb|param=float}} | |||
{{IO|SetMaxJumpHeight|Sets maximum height this entity can jump|param=float}} | |||
{{I BaseEntity|base=1|noscroll=0}} | {{I BaseEntity|base=1|noscroll=0}} | ||
{{I EnableDisable}} | {{I EnableDisable}} |
Revision as of 07:54, 11 October 2023


Template:Entity It is the entity that the tank_boss entity uses as a base and thus shares a lot of its behaviors. A few examples include:
- Crushes engineer buildings that collide with it
- TFBots treat this entity as an enemy
- Drops currency pack on death
- Plays sounds to client when it gets damaged
base_boss itself was originally intended for the now-scrapped Raid gamemode. By itself, it is static and does not perform anything; however, it is still of use in setting up a custom hitbox for any custom static NPC bosses.


SetStepHeight
input.Keyvalues
- model ([todo internal name (i)]) <string>
- Filepath to the model this entity will use. Will use the model bounding box to determine its hitbox and collision
- Start Disabled (StartDisabled) <boolean>
- Stay dormant until activated (with the
Enable
input).
Inputs
- SetHealth <integer >
- Sets the entity's health to this value.
- SetMaxHealth <integer >
- Sets the entity's maximum health to this value.
- AddHealth <integer >
- Add this amount of health to the entity.
- RemoveHealth <integer >
- Subtract this amount of health from the entity.
- SetSpeed <integer >
- Sets this entity's speed to this value.
- SetStepHeight <float >
- Sets maximum height of steps that the entity can climb
- SetMaxJumpHeight <float >
- Sets maximum height this entity can jump
EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
Outputs
- OnHealthBelow90Percent to OnHealthBelow10Percent
- Fires when the entity's health goes below X percent of its maximum health.
- OnKilled
- Fired when the boss is killed.