Jump to content
The Dark Mod Forums

Damaging the Player


kingsal

Recommended Posts

Hey All,

 

Is there a way to damage the player when they get within a certain proximity of an object? Without using a trigger_hurt brush.

 

I tried doing it with an S/R attached to an AI:

"sr_class_7" "R"
"sr_type_7" "STIM_PLAYER"
"sr_state_7" "1"
"sr_effect_7_1" "effect_damage"
"sr_effect_7_1_arg1" "player"
"sr_effect_7_1_arg2" "damage_generic"
"sr_class_8" "S"
"sr_type_8" "STIM_PLAYER"
"sr_state_8" "1"
"sr_radius_8" "200"
} 

I'm not sure if its possible to damage the player from an S/R or even what to call the player here, "idPlayer" or just "player". Neither seem to work. Any thoughts or suggestions?

 

 

  • Like 1
Link to comment
Share on other sites

Obs - Ahh thanks! that seems to work.

 

I'm getting some weird results with this; player gets killed with any damage type other than atmd:damage:low and the distance check doesn't seem to work properly.

 

Grayman- Do I add the response to the info_player_start? I've never tried adding S/Rs directly to the player.

The idea is to have an AI that damages the player when they come within 3 meters or so of it.

Link to comment
Share on other sites

Try this:

 

Remove the S stim from your AI.

 

The player already fires a STIM_PLAYER of radius 350 every 1.5 seconds.

 

Since you've given your AI a response to that stim, the player will be damaged when the stim is processed.

Link to comment
Share on other sites

Alternate method:

 

Place a source STIM_HEALING stim on the AI with a negative healing amount.

 

Whereas all actors (player, AI) respond to STIM_DAMAGE, only the player responds to STIM_HEALING.

 

I don't know if negative values work, but it's worth trying.

  • Like 1
Link to comment
Share on other sites

Hey Grayman,

 

Your first method works. I placed a response on the AI that looks like this:

"sr_class_6" "R"
"sr_type_6" "STIM_PLAYER"
"sr_state_6" "1"
"sr_effect_6_1" "effect_damage"
"sr_effect_6_1_arg1" "player1"
"sr_effect_6_1_arg2" "atdm:damage_low"

When the player gets within the 350 radius, they take damage.

I wasn't able to get the reverse healing method to work.

 

350 is a pretty large radius. Is there any way to add a custom stim to the player with a smaller radius.

Something like:

"STIM_TYPE"         "STIM_PLAYER_150"
"SR_RADIUS"         "150"

Thanks for the help!

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

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 1 reply
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
×
×
  • Create New...