Welcome, Guest. Please login or register.

Author Topic: Health system  (Read 2103 times)

Offline .:CNH:. [Surfer]

  • Full Member
  • ***
  • Posts: 142
  • Sexy Stuff !
    • View Profile
Health system
« on: February 15, 2014, 01:48:06 PM »
Hey guys.

I'm afraid I need some help with a health system I'm creating at the moment. It seem so easy, but yet I find it hard to create lol.

My problem is I want to hurt all players down to 10hp, but the trigger_hurt damage the player every second or so. I tied the trigger_hurt to a trigger_once just below my trigger_hurt to be sure it would only damage the player once, but then i realised that only the first player touching the trigger_once would be hurt.

So how can i damage all players, but only once?

Hope you understand what I'm saying lol

NOTE: the player will touch the area multiple times. But must only be damaged the first time he reach this spot.

Offline Panzerhandschuh

  • Server Op
  • Sr. Member
  • *****
  • Posts: 407
    • View Profile
Re: Health system
« Reply #1 on: February 15, 2014, 06:39:17 PM »
Create a filter_activator_name with the "Filter Name" of disablehurt and a "Name" of filter_disablehurt
On the filter_activator_name, set "Filter mode" to Disallow
Set the "Filter Name" on your trigger_hurt to filter_disablehurt
Add an output to the trigger_hurt: OnStartTouch, !activator, addoutput, targetname disablehurt

Offline .:CNH:. [Surfer]

  • Full Member
  • ***
  • Posts: 142
  • Sexy Stuff !
    • View Profile
Re: Health system
« Reply #2 on: February 15, 2014, 09:33:02 PM »
The trigger_hurt works, but the damage doesn't stop. I get this message in the console:

AddOutput input fired with bad string. Format: <output name> <targetname>,<inputname>,<parameter>,<delay>,<max times to fire (-1 == infinite)>

Here's the filter options


And here's the trigger options (output fan)


What have I done wrong since it keeps damaging the player?

Offline Panzerhandschuh

  • Server Op
  • Sr. Member
  • *****
  • Posts: 407
    • View Profile
Re: Health system
« Reply #3 on: February 16, 2014, 12:47:47 AM »
You're missing the "targetname player disablehurt" on the output. It should go into the "With a parameter override of" field.
« Last Edit: February 16, 2014, 06:58:11 PM by Panzerhandschuh »

Offline .:CNH:. [Surfer]

  • Full Member
  • ***
  • Posts: 142
  • Sexy Stuff !
    • View Profile
Re: Health system
« Reply #4 on: February 16, 2014, 01:42:21 PM »
Targetname player?

I put that exactly in the "With a parameter override of" field.

I guess it should say something else? What do I have to write exactly? Because "targetname player" doesn't work?

Offline Panzerhandschuh

  • Server Op
  • Sr. Member
  • *****
  • Posts: 407
    • View Profile
Re: Health system
« Reply #5 on: February 16, 2014, 06:57:44 PM »
Wops, meant targetname disablehurt

« Last Edit: February 16, 2014, 07:00:09 PM by Panzerhandschuh »

Offline .:CNH:. [Surfer]

  • Full Member
  • ***
  • Posts: 142
  • Sexy Stuff !
    • View Profile
Re: Health system
« Reply #6 on: February 17, 2014, 04:24:53 PM »
I cannot grasp how this is still not working for me?

Here's the filter:


And here's the trigger outputs:


when the player is in the triggerzone the player keeps taking damage every second? Can you from this see what i did wrong?

Offline Panzerhandschuh

  • Server Op
  • Sr. Member
  • *****
  • Posts: 407
    • View Profile
Re: Health system
« Reply #7 on: February 17, 2014, 07:05:33 PM »
Did you set the Filter name on the trigger_hurt to filter_disablehurt?

Offline Sacred

  • Modders
  • Full Member
  • *
  • Posts: 203
    • View Profile
Re: Health system
« Reply #8 on: February 18, 2014, 07:46:34 AM »
You should just have read a tutorial about filters \

Offline .:CNH:. [Surfer]

  • Full Member
  • ***
  • Posts: 142
  • Sexy Stuff !
    • View Profile
Re: Health system
« Reply #9 on: February 19, 2014, 01:59:38 AM »
@Panzerhandschuh

Yes. unfortunately. hmm. would it be easier to upload the vmf so you can investigete the problem? If you want to of course \

@Sacred
That would be great! Do you know any specific guides you could refer me to? \

Offline Panzerhandschuh

  • Server Op
  • Sr. Member
  • *****
  • Posts: 407
    • View Profile
Re: Health system
« Reply #10 on: February 19, 2014, 04:52:55 AM »
The trigger_hurt output needs a 0.1 sec delay for some reason.

VMF: http://www.mediafire.com/view/yhysfac9j2actox/hurtonce.vmf