Semi-automatically generated modding documentation for Barotrauma

TriggerComponent

Attributes

Attribute Type Default value Description
Force float 0 The maximum amount of force applied to the triggering entitites.
DistanceBasedForce bool false Determines if the force gets higher the closer the triggerer is to the center of the trigger.
ForceFluctuation bool false Determines if the force fluctuates over time or if it stays constant.
ForceFluctuationStrength float 1 How much the fluctuation affects the force. 1 is the maximum fluctuation, 0 is no fluctuation.
ForceFluctuationFrequency float 1 How fast (cycles per second) the force fluctuates.
ForceFluctuationInterval float 0.01 How often (in seconds) the force fluctuation is calculated.
ApplyEffectsToCharactersInsideSub bool false  
MoveOutsideSub bool false  

This component also supports the attributes defined in: ItemComponent

Example

<Item identifier="gravitysphere" category="Alien" linkable="true" scale="0.5">
  <TriggerComponent triggeredby="Human, Item" force="75" radius="1000" distancebasedforce="true">
    <StatusEffect type="OnActive" target="This">
      <ParticleEmitter particle="gravityspherefx" particleamount="1" emitinterval="1.25" />
    </StatusEffect>
  </TriggerComponent>
  <TriggerComponent triggeredby="Human, Item" force="0" radius="500">
    <Attack onlyhumans="true">
      <Affliction identifier="internaldamage" strength="3" />
    </Attack>
    <StatusEffect type="OnActive" target="This">
      <ParticleEmitter particle="gravityspherefx2" particlespersecond="3" />
      <ParticleEmitter particle="skyholderfx2" anglemax="360" distancemin="400" distancemax="500" velocitymin="-500" velocitymax="-900" particlespersecond="200" colormultiplier="255,180,255,255" />
    </StatusEffect>
  </TriggerComponent>
  <TriggerComponent triggeredby="Human, Item" force="0" radius="100">
    <Attack onlyhumans="true">
      <Affliction identifier="internaldamage" strength="8" />
    </Attack>
    <StatusEffect type="OnActive" target="This">
      <ParticleEmitter particle="gravityspherefx2" particlespersecond="5" scalemin="0.7" scalemax="0.7" />
      <ParticleEmitter particle="skyholderfx2" anglemax="360" distancemin="300" distancemax="400" velocitymin="-700" velocitymax="-1200" particlespersecond="100" colormultiplier="255,180,255,255" />
    </StatusEffect>
  </TriggerComponent>
  <ConnectionPanel canbeselected="true" hudpriority="10">
    <RequiredItem items="screwdriver" type="Equipped" />
    <GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
    <input name="toggle" displayname="connection.togglestate" />
    <input name="set_state" displayname="connection.setstate" />
    <output name="state_out" displayname="connection.stateout" fallbackdisplayname="connection.signalout" />
  </ConnectionPanel>
  [...]
</Item>