fx explosion and dmg
Moderator: Core Staff
-
- CJ Worshipper
- Posts: 492
- Joined: July 6th, 2006, 11:37 pm
- Location: The Netherlands
- Contact:
fx explosion and dmg
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 ?
this possible or ?
Cod 1 Mapper&Modder&Moddeler
-
- CJ Worshipper
- Posts: 383
- Joined: December 16th, 2005, 6:38 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:
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();
}
}
-
- CJ Worshipper
- Posts: 492
- Joined: July 6th, 2006, 11:37 pm
- Location: The Netherlands
- Contact:
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();
}
}
o and small bug in the script
main ()
should be main()
Cod 1 Mapper&Modder&Moddeler
yes and no..the damage zone is the trigger_hurt which is activated after the trigger_damage is used.creator wrote:damage trig = trigger damage,
damage zone = the objective?
Thats not a bugo and small bug in the script
main ()
should be main()

You just need to add the coordinates for the fx where you want it to start.
-
- CJ Worshipper
- Posts: 492
- Joined: July 6th, 2006, 11:37 pm
- Location: The Netherlands
- Contact:
the script aint working..
i get no error but
the trigger hurt even works without triggering the damage and i see no explosion...
edit: when i walked thru trigger hurt and shot the trigger damage i get a compile error
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();
}
}
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
-
- CJ Worshipper
- Posts: 492
- Joined: July 6th, 2006, 11:37 pm
- Location: The Netherlands
- Contact:
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
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
Who is online
Users browsing this forum: No registered users and 0 guests