Damage (de)activating)!

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
User avatar
Moriar
CJ Newbie
CJ Newbie
Posts: 88
Joined: March 12th, 2006, 8:15 pm
Location: The Netherlands

Damage (de)activating)!

Post by Moriar » July 8th, 2006, 3:34 pm

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

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » July 8th, 2006, 5:05 pm

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();
}
}
Image
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

Pedsdude
Site Admin
Site Admin
Posts: 15914
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » July 8th, 2006, 5:13 pm

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.
Image
Image

User avatar
Moriar
CJ Newbie
CJ Newbie
Posts: 88
Joined: March 12th, 2006, 8:15 pm
Location: The Netherlands

Post by Moriar » July 8th, 2006, 11:35 pm

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:

User avatar
Moriar
CJ Newbie
CJ Newbie
Posts: 88
Joined: March 12th, 2006, 8:15 pm
Location: The Netherlands

Post by Moriar » July 8th, 2006, 11:44 pm

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

User avatar
Moriar
CJ Newbie
CJ Newbie
Posts: 88
Joined: March 12th, 2006, 8:15 pm
Location: The Netherlands

Post by Moriar » July 9th, 2006, 12:11 am

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

User avatar
Moriar
CJ Newbie
CJ Newbie
Posts: 88
Joined: March 12th, 2006, 8:15 pm
Location: The Netherlands

Post by Moriar » July 9th, 2006, 12:26 am

:D :D :D
It worked...
Thanks for helping...
and Drofder how do you know all this?
It seems you got answers for everything :wink:

Lisa
CJ Worshipper
CJ Worshipper
Posts: 442
Joined: December 24th, 2005, 1:22 am
Location: US of A

Post by Lisa » July 9th, 2006, 1:36 am

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:
Image
~Materazzi~
Image

User avatar
Moriar
CJ Newbie
CJ Newbie
Posts: 88
Joined: March 12th, 2006, 8:15 pm
Location: The Netherlands

Post by Moriar » July 9th, 2006, 1:41 am

Yea....
He truly is GOD :wink:
Well Drofder keep on doing that good work!

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » July 9th, 2006, 8:23 am

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.
Image
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

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests