Page 1 of 2
fx explosion and dmg
Posted: November 12th, 2006, 4:32 am
by creator
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 ?
Posted: November 12th, 2006, 12:08 pm
by All-Killer
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
Posted: November 12th, 2006, 12:20 pm
by creator
yeh but that play fx gives me a 'trigger error'
Posted: November 12th, 2006, 5:48 pm
by Luke
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();
}
}
Posted: November 12th, 2006, 8:27 pm
by creator
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
Posted: November 12th, 2006, 8:41 pm
by Luke
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.
Posted: November 12th, 2006, 9:44 pm
by creator
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()
Posted: November 12th, 2006, 9:48 pm
by creator
damage trig = trigger damage,
damage zone = the objective?
Posted: November 12th, 2006, 10:14 pm
by Luke
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
You just need to add the coordinates for the fx where you want it to start.
Posted: November 12th, 2006, 10:25 pm
by creator
ok so this is just the trigger damage and trigger hurt ^^ thanks luke
Posted: November 12th, 2006, 10:52 pm
by creator
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;
Posted: November 12th, 2006, 11:13 pm
by Luke
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.
Posted: November 12th, 2006, 11:14 pm
by creator
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!

Posted: November 12th, 2006, 11:21 pm
by Luke
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.
Posted: November 12th, 2006, 11:24 pm
by creator
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