Jump to content
The Dark Mod Forums

Trigger_hurt, how to use? How does it work?


RJFerret

Recommended Posts

Anyone familiar with trigger_hurt who might explain how to use it? The benefits of using it instead of simply applying a damage stim to an existing entity? The cons? Is it obsolete?

 

Any particularly useful spawnargs associated with it? Do different damage defs do different things (aside from the obvious numerical magnitude)? Are they explained anywhere?

 

The current wiki page on it is no help whatsoever. ;-)

 

Appreciate any insights please!

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

I thinks its an any size volume brush, bit like trigger_multiple but it damages the activator of the trigger, either player or ai. from the defs file it says you can set the type of damage defined in the damage.def file and the delay in seconds the damage is applied to activator.

 

the brush can be triggered on and off. it defaults to starting on and damage_painTrigger every second.

 

there's a lot of damage types in the damage def file, too many to list.

Link to comment
Share on other sites

I've used these to damage the player because I've never yet managed to get a damage stim working. They are handy for positioning over bonfires because the default behaviour is to apply 10 points of damage per second. I've not had to change those settings, but there's a couple of clues in the entity def:

 

"editor_usage" "Damages the activator. Can be turned on or off by other triggers."

"editor_bool on" "Whether or not it is active."

"editor_var delay" "Delay between damage in seconds defaults to 1"

"editor_var def_damage" "Damage def to use, common ones are damage_painTrigger, damage_triggerhurt_100, damage_triggerhurt_1000"

"on" "1"

"def_damage" "damage_painTrigger"

 

The damages are defined in tdm_defs01/def/tdm_damage.def. Looks like there's no difference except in magnitude. The default damage_paintrigger is:

 

entityDef damage_painTrigger {

"damage" "10"

}

 

All the bespoke damage_trigger_hurt look like this with nothing set and only the magnitude changing:

 

 

entityDef damage_triggerhurt_75 {

"damage" "75"

"kickDir" "0 0 0"

"mtr_blob" "genericDamage"

"blob_time" "0"

"blob_size" "0"

"blob_offset_x" "0"

"knockback" "0"

"kick_time" "0"

"kick_amplitude" "0"

"dv_time" "100"

}

 

 

But there are plenty of more interesting damages in that file, which could presumably be used with a trigger hurt too. This looks fun:

 

 

entityDef damage_HugeExplosion {

"damage" "500"

"radius" "256"

"push" "10000"

"knockback" "200"

}

 

Yes that worked. I didn't quite splat against the skybox as hoped, just against a nearby wall.

Link to comment
Share on other sites

Thank you both, and awesome, I had no clue we could cause knockbacks! Sounds like you want to write a custom def to blast yourself into the skybox. ;-)

 

Taking both your posts, I wrote this entry in the wiki: http://wiki.thedarkmod.com/index.php?title=Triggers#trigger_hurt

 

Please revise, or inform me to revise accordingly, thanks!

  • Like 1

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

That's a good, concise summary. I can't think of anything to suggest adding. I was wondering whether to mention that the damage defs are viewable in DR in the root of the entity tree (which I noticed only last night) but I see you got it anyway.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 1 reply
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...