Damage (de)activating)!
Moderator: Core Staff
Damage (de)activating)!
Hi,
I want to make a damage trigger which activates when I press on my [use]button.
it's the same as in peds_pace, so when I press the button the trigger_hurt will activated/deactivated....
So can anyone please help me with this?
Thanks in Advance
I want to make a damage trigger which activates when I press on my [use]button.
it's the same as in peds_pace, so when I press the button the trigger_hurt will activated/deactivated....
So can anyone please help me with this?
Thanks in Advance
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
I'm presuming you have a little knowledge of scripting, so I will skip the explaining (if you don't understand, reply back
) - Code is untested, but looks fine to me...

Code: Select all
main()
{
trigger_think();
}
trigger_think()
{
trig = getent("trigger","targetname");
hurt_trig = getent("hurt_trig","targetname");
while(1)
{
trig waittill ("trigger");
hurt_trig maps\mp\_utility::triggerOff();
trig waittill ("trigger");
hurt_trig maps\mp\_utility::triggerOn();
}
}

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Well, I have always been reffered to a JesusLisa wrote:Drofder is GOD..so don't you forget thatMoriar wrote:![]()
![]()
![]()
It worked...
Thanks for helping...
and Drofder how do you know all this?
It seems you got answers for everything

3 years of mapping, 2 years of scripting = knowledge.

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Who is online
Users browsing this forum: No registered users and 3 guests