fx explosion and dmg

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

Moderator: Core Staff

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

fx explosion and dmg

Post by creator » November 12th, 2006, 4:32 am

how can i make a fx explosion that can only be triggerd/show only ones, like a house explodes if u throw a nade inside and if ur close to the explosion u lose health or die.
this possible or ?
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 12th, 2006, 12:08 pm

Look at my topic and you will find a lot of info how to make a trigger FX but for the damage i don't know the answer
Image

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

Post by creator » November 12th, 2006, 12:20 pm

yeh but that play fx gives me a 'trigger error'
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 12th, 2006, 5:48 pm

You could do it like this: create a trigger_damage, press N and give it a targetname, tick the boxes like NO_PISTOL ect if you dont want it triggered by them. Give it a wait value of -1 so it only triggers once, and set you accumulation/threshold damage(the info for all these values is shown in the entity box).

Now for hurt area for when you're near it, you could create a trigger_hurt, and place it where you want the player to be hurt when the trigger_damage is triggered. Give the hurt trigger a targetname and choose a dmg value(default 5).
For the scripting you could use something like this:

Code: Select all

Main ()
{
maps\mp\_load::main();
thread damage();
level._effect["your effect name alias"] = loadfx ("fx/effect folder/effect name.efx");
}

damage()
{
damage_trig = getent ("damage_trig","targetname");
damage_zone = getent ("damage_zone","targetname");
damage_zone thread maps\mp\_utility::triggerOff();
while (1)
{
damage_trig waittill ("trigger");
playfx(level._effect["your effect name alias"], (0, 0, 0));//your coords
damage_zone thread maps\mp\_utility::triggerOn();
wait 1;
damage_zone thread maps\mp\_utility::triggerOff();
}
}

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

Post by creator » November 12th, 2006, 8:27 pm

ok but how does the 'fx' work? do i just need to go to pak5.pk3 then fx folder, and get the fx i want then put the name in the script or somthin else
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 12th, 2006, 8:41 pm

Well you just need to locate the fx file you want to use, then type in its path where I put ("fx/effect folder/effect name.efx");
and ["your effect name alias"] this bit can be called anything, its just used to reference the effect.

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

Post by creator » November 12th, 2006, 9:44 pm

Code: Select all

Main()
{
maps\mp\_load::main();
thread damage();
level._effect["explosion"] = loadfx ("fx/explosion/tank_explosion.efx");
}

damage()
{
damage_trig = getent ("damage_trig","targetname");
damage_zone = getent ("damage_zone","targetname");
damage_zone thread maps\mp\_utility::triggerOff();
while (1)
{
damage_trig waittill ("trigger");
playfx(level._effect["explosion"], (0, 0, 0));//your coords
damage_zone thread maps\mp\_utility::triggerOn();
wait 1;
damage_zone thread maps\mp\_utility::triggerOff();
}
}
so this will work?
o and small bug in the script

main ()
should be main()
Cod 1 Mapper&Modder&Moddeler

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

Post by creator » November 12th, 2006, 9:48 pm

damage trig = trigger damage,
damage zone = the objective?
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 12th, 2006, 10:14 pm

creator wrote:damage trig = trigger damage,
damage zone = the objective?
yes and no..the damage zone is the trigger_hurt which is activated after the trigger_damage is used.
o and small bug in the script

main ()
should be main()
Thats not a bug :roll:

You just need to add the coordinates for the fx where you want it to start.

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

Post by creator » November 12th, 2006, 10:25 pm

ok so this is just the trigger damage and trigger hurt ^^ thanks luke
Cod 1 Mapper&Modder&Moddeler

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

Post by creator » November 12th, 2006, 10:52 pm

the script aint working..
i get no error but
the trigger hurt even works without triggering the damage and i see no explosion...

Code: Select all

Main()
{
maps\mp\_load::main();
thread damage();

level._effect["explosion"] = loadfx ("fx/explosion/tank_explosion.efx");
}

damage()
{
damage_trig = getent ("damage_trig","targetname");
damage_zone = getent ("damage_zone","targetname");
damage_zone thread maps\mp\_utility::triggerOff();
while (1)
{
damage_trig waittill ("trigger");
playfx(level._effect["explosion"], (11, 12, 45));//your coords
damage_zone thread maps\mp\_utility::triggerOn();
wait 1;
damage_zone thread maps\mp\_utility::triggerOff();
}
}
edit: when i walked thru trigger hurt and shot the trigger damage i get a compile error

Code: Select all

dead entity is not an object: ("file 'maps\mp\mp_creator.gsc', line 14")
while (1)
*
called from:
("file 'maps\mp\mp_creator.gsc', line 19")
wait 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 12th, 2006, 11:13 pm

I tested the script before i posted in cod 2 and it works. as far as i know should work in cod 1 the same. the trigger_hurt should not be on to begin with, make sure you've got the correct targetnames for both triggers.

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

Post by creator » November 12th, 2006, 11:14 pm

IT BETTER BE!!! ;) hehe ok i will look i think i messed em up ^^
hurt = damage_trig
damage = damage_zone
i'll switch em around and test :) if it works well.. uhh THX! :P
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 12th, 2006, 11:21 pm

damage_zone is the hurt trig, damage_trig is the trigger_damage which sets it all off. sorry i didnt make it clearer, its just something i put together in 5 mins. if you've got cod 2 radiant i can send u the little test map i made.

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

Post by creator » November 12th, 2006, 11:24 pm

i only got cod1 ^^ cant u convert it ?
ps. partly working, hurt waits till trigger
but then i get another error

dead entity is not an object: ("file 'maps\mp\mp_creator.gsc', line 16")
damage_trig waittill ("trigger");
*
called from:
("file 'maps\mp\mp_creator.gsc', line 19")
wait 1;
ps. explosion still aint showing
o and post ur x fire, i'll add u
Cod 1 Mapper&Modder&Moddeler

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest