Page 1 of 1

Damage (de)activating)!

Posted: July 8th, 2006, 3:34 pm
by Moriar
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

Posted: July 8th, 2006, 5:05 pm
by Drofder2004
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();
}
}

Posted: July 8th, 2006, 5:13 pm
by Pedsdude
Check the files from my peds_pace map, plus try using the search feature as Drofder already explained how to do this in one of my topics.

Posted: July 8th, 2006, 11:35 pm
by Moriar
OK thanks...
I know this sounds stupid but, what trigger do I have to use?
I dont really understand those triggers, :( I always use trigger_multiple but does that also work on that scripting part of you drofder?

Can anyone explain all these triggers? I dont really understand them all :roll:

Posted: July 8th, 2006, 11:44 pm
by Moriar
Actually this is the point: I don't really know how to map this :( :roll: :cry:
Can anyone explain it?
or send me a little .map with the scripting files :)
mostly I understand the .map + .gsc quicker

Posted: July 9th, 2006, 12:11 am
by Moriar
OK..
Thank you,
now I will make the edit the map and I'll test it...
If it doesn't work I'll tell it. :D

Posted: July 9th, 2006, 12:26 am
by Moriar
:D :D :D
It worked...
Thanks for helping...
and Drofder how do you know all this?
It seems you got answers for everything :wink:

Posted: July 9th, 2006, 1:36 am
by Lisa
Moriar wrote::D :D :D
It worked...
Thanks for helping...
and Drofder how do you know all this?
It seems you got answers for everything :wink:
Drofder is GOD..so don't you forget that :wink:

Posted: July 9th, 2006, 1:41 am
by Moriar
Yea....
He truly is GOD :wink:
Well Drofder keep on doing that good work!

Posted: July 9th, 2006, 8:23 am
by Drofder2004
Lisa wrote:
Moriar wrote::D :D :D
It worked...
Thanks for helping...
and Drofder how do you know all this?
It seems you got answers for everything :wink:
Drofder is GOD..so don't you forget that :wink:
Well, I have always been reffered to a Jesus ;)

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