Entity Modules: Difference between revisions

From SigMod
Jump to navigation Jump to search
(Created page with "== rotator == Rotates itself in order to face a specified entity === Inputs === * RotateTowards <string> ** Start rotating towards the specified entity * StopRotateTowards *...")
 
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Gives entities extra functionalities. To add a module, insert $modules <module> keyvalue to the selected entity. You can add multiple modules separated by comma, . Module inputs, outputs and keyvalues are added to the entity
== rotator ==
== rotator ==
Rotates itself in order to face a specified entity
Rotates itself in order to face a specified entity
Line 4: Line 6:
=== Inputs ===
=== Inputs ===


* RotateTowards <string>
* $RotateTowards <string>
** Start rotating towards the specified entity
** Start rotating towards the specified entity
* StopRotateTowards
* $StopRotateTowards
** Stop rotating
** Stop rotating


=== Keyvalues ===
=== Keyvalues ===


* lookat <string> (Default: eyes)
* $lookat <string> (Default: eyes)
** Decides at what part of the target the entity should look exactly. Possible values: eyes, origin, center, aim (at what the target is looking at)
** Decides at what part of the target the entity should look exactly. Possible values: eyes, origin, center, aim (at what the target is looking at)
* projectilespeed <number> (Default: 0)
* $projectilespeed <number> (Default: 0)
** The speed of the projectile that would be fired from rotator position. This allows the rotator to lead its aim
** The speed of the projectile that would be fired from rotator position. This allows the rotator to lead its aim
* aimoffset <number> (Default: 0)
* $aimoffset <number> (Default: 0)
** Account for gravity by adjusting the rotator by this many degrees for every unit away from the target
** Account for gravity by adjusting the rotator by this many degrees for every unit away from the target
* velocitymode <1/0> (Default: 0)
* $velocitymode <1/0> (Default: 0)
** Set angular velocity instead of setting angles directly. Only works on some entities
** Set angular velocity instead of setting angles directly. Only works on some entities
* rotationspeedx <number> (Default: 0)
* $rotationspeedx <number> (Default: 0)
** Rotation speed in x (pitch, up/down) axis
** Rotation speed in x (pitch, up/down) axis
* rotationspeedy <number> (Default: 0)
* $rotationspeedy <number> (Default: 0)
** Rotation speed in y (yaw, left/right) axis
** Rotation speed in y (yaw, left/right) axis
* rotationlimitx <number> (Default: 0)
* $rotationlimitx <number> (Default: 0)
** If set to value other than 0, the rotator cannot rotate above this angle in x axis (pitch, up/down)
** If set to value other than 0, the rotator cannot rotate above this angle in x axis (pitch, up/down)
* rotationlimity <number> (Default: 0
* $rotationlimity <number> (Default: 0
** If set to value other than 0, the rotator cannot rotate above this angle in y axis (yaw, left/right)
** If set to value other than 0, the rotator cannot rotate above this angle in y axis (yaw, left/right)


== fakeparent ==
== fakeparent ==
Follows another entity, similar to setting parent entity, but can be used to workaround issues regarding parented entities.
=== Keyvalues ===
* $bone <string>
** Follow the specified bone of the parent instead of origin
* $attachment <string>
** Follow the specified attachment of the parent instead of origin
* $positiononly <1/0>
** Only follow the position of the parent, do not rotate
* $rotationonly <1/0>
** Only follow the rotation of the parent, do not move
* $fakeparentoffset <vector>
** Offset from the parent
* $fakeparentrotation <angles>
** Rotation offset from the parent
=== Inputs ===
* $SetFakeParent <string>
** Set the specified entity as fake parent
* $ClearFakeParent
** Stop following entity
=== Outputs ===
* $OnFakeParentKilled
** Fired when the parent entity is killed
== aimfollow ==
Follows the aim of an another entity, the position of the entity is constantly updated to where the aim entity is looking at
=== Keyvalues ===
* $rotationfollow <1/0>
** Rotate the entity to match the aim entity aim angles as well
=== Inputs ===
* $SetAimFollow <string>
**Follow the aim of the specified entity
== forwardvelocity ==
Sets a constant entity forward velocity
=== Keyvalues ===
* $forwardspeed <number>
** Forward entity speed
* $directmode <1/0>
** Move the entity in forward direction directly instead of setting velocity, this will work on any entity but will ignore solid objects
[[Category:Misc Additions]]

Latest revision as of 11:29, 5 March 2022

Gives entities extra functionalities. To add a module, insert $modules <module> keyvalue to the selected entity. You can add multiple modules separated by comma, . Module inputs, outputs and keyvalues are added to the entity

rotator[edit | edit source]

Rotates itself in order to face a specified entity

Inputs[edit | edit source]

  • $RotateTowards <string>
    • Start rotating towards the specified entity
  • $StopRotateTowards
    • Stop rotating

Keyvalues[edit | edit source]

  • $lookat <string> (Default: eyes)
    • Decides at what part of the target the entity should look exactly. Possible values: eyes, origin, center, aim (at what the target is looking at)
  • $projectilespeed <number> (Default: 0)
    • The speed of the projectile that would be fired from rotator position. This allows the rotator to lead its aim
  • $aimoffset <number> (Default: 0)
    • Account for gravity by adjusting the rotator by this many degrees for every unit away from the target
  • $velocitymode <1/0> (Default: 0)
    • Set angular velocity instead of setting angles directly. Only works on some entities
  • $rotationspeedx <number> (Default: 0)
    • Rotation speed in x (pitch, up/down) axis
  • $rotationspeedy <number> (Default: 0)
    • Rotation speed in y (yaw, left/right) axis
  • $rotationlimitx <number> (Default: 0)
    • If set to value other than 0, the rotator cannot rotate above this angle in x axis (pitch, up/down)
  • $rotationlimity <number> (Default: 0
    • If set to value other than 0, the rotator cannot rotate above this angle in y axis (yaw, left/right)

fakeparent[edit | edit source]

Follows another entity, similar to setting parent entity, but can be used to workaround issues regarding parented entities.

Keyvalues[edit | edit source]

  • $bone <string>
    • Follow the specified bone of the parent instead of origin
  • $attachment <string>
    • Follow the specified attachment of the parent instead of origin
  • $positiononly <1/0>
    • Only follow the position of the parent, do not rotate
  • $rotationonly <1/0>
    • Only follow the rotation of the parent, do not move
  • $fakeparentoffset <vector>
    • Offset from the parent
  • $fakeparentrotation <angles>
    • Rotation offset from the parent

Inputs[edit | edit source]

  • $SetFakeParent <string>
    • Set the specified entity as fake parent
  • $ClearFakeParent
    • Stop following entity

Outputs[edit | edit source]

  • $OnFakeParentKilled
    • Fired when the parent entity is killed

aimfollow[edit | edit source]

Follows the aim of an another entity, the position of the entity is constantly updated to where the aim entity is looking at

Keyvalues[edit | edit source]

  • $rotationfollow <1/0>
    • Rotate the entity to match the aim entity aim angles as well

Inputs[edit | edit source]

  • $SetAimFollow <string>
    • Follow the aim of the specified entity

forwardvelocity[edit | edit source]

Sets a constant entity forward velocity

Keyvalues[edit | edit source]

  • $forwardspeed <number>
    • Forward entity speed
  • $directmode <1/0>
    • Move the entity in forward direction directly instead of setting velocity, this will work on any entity but will ignore solid objects