trigger_damage value o.O?

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

Moderator: Core Staff

Post Reply
User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

trigger_damage value o.O?

Post by waywaaaard » April 23rd, 2007, 8:08 pm

hey i made a trigger_damage and

Code: Select all

secretdoormove()
{
secret_door = getent ("secretdoor1","targetname");
trigger_secret_door = getent ("damage_ss_trig","targetname");
while(1)
{
trigger_secret_door waittill ("trigger");
secret_door moveX (58,2,0.5,0.5);
secret_door waittill ("movedone");
wait(5);
secret_door moveX (-58,2,0.5,0.5);
secret_door waittill ("movedone");
}
}
it works fine but i want to add a value so that it needs about 5 shots with the pistol to work not only one
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » April 23rd, 2007, 8:57 pm

I will try and whip something up, I can't make it just right now tho.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » April 25th, 2007, 1:15 am

Code: Select all

main()
{
thread secretdoormove();

level.addDamage=0;
} 

secretdoormove()
{
trig = getent("damage_ss_trig","targetname");
block = getent ("secretdoor1","targetname");
while (1)
{
trig waittill ("damage", idamage);
level.addDamage=level.addDamage+idamage; 
if(level.addDamage > 300)
	{
        block moveZ (-64, 3, 1, 1);
        block waittill ("movedone");
        wait 2;
        block moveZ (64, 3, 1, 1);
        block waittill ("movedone");
        level.addDamage=0;
	}
wait 0.05;
}
}
Alright, give that a try, let me know if you find anything wrong.
Note: Has not been tested.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Post by waywaaaard » April 25th, 2007, 1:01 pm

w00t works fine for me ;-)

thanks nightmare <-- the cod/2 mapping god
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » April 25th, 2007, 10:07 pm

alright cool.
if you need anything else just ask. :)
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests