Triggered explotions

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

Moderator: Core Staff

All-Killer
CJ Worshipper
CJ Worshipper
Posts: 383
Joined: December 16th, 2005, 6:38 pm

Triggered explotions

Post by All-Killer » November 11th, 2006, 2:40 pm

So this is what i want. For example: You walking in a room and sudenly the ceiling collapse and fall down by a mortar ore somthing. After the explosion you have a hole in the roof and you have the broken roof on the ground with some nice fire. Another example. Youre walking trough a hallway and on both sides on the wall runs some pipe with bezin ore gas. And when you walk trough the trigger: Boom and the pipe is broken and some fire

Is this possible to do? And how? Im sure drofder know's a way :D

Thanks for reading this.
Image

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » November 11th, 2006, 3:47 pm

You could hide and show the broken/unbroken parts when the trigger is used, and have an effect played at the same time.
Something like this

Code: Select all

brokenparts hide();
trig waittill ("trigger");
playfx(level._effect["your effect"], (0, 0, 0));//add your coords
unbrokenparts hide();
brokenparts show();

All-Killer
CJ Worshipper
CJ Worshipper
Posts: 383
Joined: December 16th, 2005, 6:38 pm

Post by All-Killer » November 11th, 2006, 4:27 pm

so what are the targetnames then? Please explain it some more.
Image

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Post by Soviet » November 11th, 2006, 11:16 pm

the trigger for walking through would of course be trigger_touch

and you might want to consider building the normal part first, then copying and pasting that whole part, then with that new part selected hide it. Then make the still visible part broken and rename it. This will give you the original to work with as well as less confusing mapping going on while you make it.
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

All-Killer
CJ Worshipper
CJ Worshipper
Posts: 383
Joined: December 16th, 2005, 6:38 pm

Post by All-Killer » November 12th, 2006, 12:04 pm

Oke thanks i will test this. Its for a singleplayer map so i think it needs a trigger_once so that it will be triggerd only once. Thanks for the info!
Image

Soviet
Core Staff
Core Staff
Posts: 7760
Joined: April 23rd, 2005, 9:12 pm
Location: Plano, Texas
Contact:

Post by Soviet » November 12th, 2006, 7:00 pm

KillerSam wrote:trigger_multiple tbh
shhhh, dont prove me wrong :P

im looking foward to seeing this, ive always loved scripted events like this.
Image
ImageImageImage
Image
"Zaitsev is a cunt." - Pedsdude

All-Killer
CJ Worshipper
CJ Worshipper
Posts: 383
Joined: December 16th, 2005, 6:38 pm

Post by All-Killer » November 13th, 2006, 1:12 pm

Heheh i will test this one of these day was a bit bussy you will hear with trigger worked :D
Image

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » November 13th, 2006, 4:47 pm

killer i can help u on x fire ^^ luke helpt me with it now i know it :)
Cod 1 Mapper&Modder&Moddeler

All-Killer
CJ Worshipper
CJ Worshipper
Posts: 383
Joined: December 16th, 2005, 6:38 pm

Post by All-Killer » November 13th, 2006, 8:20 pm

Hmm tested it and i get this error: uninitialised varible 'explosion_trig)
explosion_trig waittill ("trigger",user);

GSC

Code: Select all

main()
{
maps\_load::main();

thread explosion();
}

explosion()
{
roof = getent ("roof","targetname");
brokenroof = getent ("brokenroof","targetname"); 
explotion_trig = getent ("explosion_trig","targetname"); 
while (1)
{
brokenroof hide();
brokenroof notsolid();
explosion_trig waittill ("trigger",user);
roof hide();
roof notsolid();
brokenroof show();
brokenroof solid(); 
}
}
Image

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » November 13th, 2006, 8:30 pm

main()
{
maps\_load::main();

thread explosion();
}

explosion()
{
roof = getent ("roof","targetname");
brokenroof = getent ("brokenroof","targetname");
explotion_trig = getent ("explosion_trig","targetname");
while (1)
{
brokenroof hide();
brokenroof notsolid();
explosion_trig waittill ("trigger",user);
roof hide();
roof notsolid();
brokenroof show();
brokenroof solid();
}
}

make the roof: 'delete' instead hide, this will remove it permanently [till map restarts] from the game
replace 't' with 's'
Cod 1 Mapper&Modder&Moddeler

All-Killer
CJ Worshipper
CJ Worshipper
Posts: 383
Joined: December 16th, 2005, 6:38 pm

Post by All-Killer » November 13th, 2006, 8:46 pm

hmm its working for the half: the roof disappears but the brokenroof doesnt appeare. i checked the targetnames and are good. Its for a SP map
Image

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » November 13th, 2006, 9:21 pm

try adding a small wait time between those 4 hide and show and not solid
like

wait 0.1;
Cod 1 Mapper&Modder&Moddeler

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » November 13th, 2006, 9:37 pm

I told him to put the brokenroof hide(); and brokenroof notsolid(); above the while(1) and he said that worked.
Watch this before posting a question: http://www.albinoblacksheep.com/flash/posting.php

creator
CJ Worshipper
CJ Worshipper
Posts: 492
Joined: July 6th, 2006, 11:37 pm
Location: The Netherlands
Contact:

Post by creator » November 13th, 2006, 10:02 pm

what does the while(1) do anyway? or dont u know [just that u need to have it]
Cod 1 Mapper&Modder&Moddeler

9mm
CJ Donator
CJ Donator
Posts: 183
Joined: February 14th, 2006, 10:57 pm
Location: USA

Post by 9mm » November 14th, 2006, 12:23 am

I believe it just makes it an infinite loop

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests