Skip to content

[entity] Implement support for target_multimanager #103

Description

@heysokam

Triggers a bunch of targets with unique delays.

The keys for the targets have to contain 2 digits for the target number.
So "target1" won't work while "target01" is correct.
Target values should look like one of the following:
delay_in_seconds:targetname
targetname
Examples:
1.5:my_target_door
my_other_target_door

The first version will use the given delay while the second version will use the delay that is given by the wait key of the multimanager entity.
For those targets the wait delay is not added twice if ADD_WAIT is set!

The multimanager can only be triggered again after all of its targets were triggered!
So the maximum of the delays is also the cooldown time.

Example for using the WAIT_OFFSET spawnflag:
target01: my_target1
target02: my_target2
target03: my_target3
target04: 2:my_target4

With a wait value of 0.5 the targets will have the following trigger delays:
target01: triggers my_target1 after 0.5 seconds
target02: triggers my_target2 after 1.0 seconds
target03: triggers my_target3 after 1.5 seconds
target04: triggers my_target4 after 4.0 seconds (special delay for this target is 2)
...
target40: 40th (max) target to trigger.

Keys

  • targetname | Target Name | targetname | | Activating trigger points to this.
  • target01 | Target 01 | target | | First target to trigger.
  • target02 | Target 02 | target | | Second target to trigger.
  • random | Random delay | real | 0 | Additional random delay for all targets.
  • count | # of targets to trigger | integer | | If this is set only a given amount of targets is triggered in a random way (e.g. 5 of 10 targets).
  • wait | Delay | real | 0 | Delay that is used by targets without an explicit delay or if either the ADD_WAIT or WAIT_OFFSET flag is set.

Spawnflags

  • RED_ONLY | RED_ONLY | Only red team can trigger.
  • BLUE_ONLY | BLUE_ONLY | Only blue team can trigger.
  • ADD_WAIT | ADD_WAIT | Adds the value of the wait key to all delays. Is ignored if WAIT_OFFSET is set.
  • WAIT_OFFSET | WAIT_OFFSET | Adds the value of "target_number * wait_delay" to all delays. See notes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions