Script help plz
Moderator: Core Staff
Script help plz
I have an tree with an fx model with a trigger damage
but i have the script
main()
{
thread boom();
}
boomblaadjes()
{
trig = getent("leaves","targetname");
while (1)
{
trig waittill ("damage", idamage);
{
level._effect["tree"] = loadfx ("fx/impacts/leafs.efx");
maps\mp\_fx::loopfx("leafs", (912, -16, 600), 0.6);
}
}
It say's it has an loop i think so but it don't loop and i tryed
also to do trigger>multiple but doesn't respond on damge
but i have the script
main()
{
thread boom();
}
boomblaadjes()
{
trig = getent("leaves","targetname");
while (1)
{
trig waittill ("damage", idamage);
{
level._effect["tree"] = loadfx ("fx/impacts/leafs.efx");
maps\mp\_fx::loopfx("leafs", (912, -16, 600), 0.6);
}
}
It say's it has an loop i think so but it don't loop and i tryed
also to do trigger>multiple but doesn't respond on damge
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Script help plz
Trigger_multiple responds to touch
trigger_damage responds to damage
main()
{
thread boom();
}
boomblaadjes() <-- This should be the same as above: boom()
{
trig = getent("leaves","targetname");
while (1)
{
trig waittill ("damage", idamage);
{ <-- This doesn't do anything
level._effect["tree"] = loadfx ("fx/impacts/leafs.efx"); <-- This should be loaded before the script is loaded
maps\mp\_fx::loopfx("leafs", (912, -16, 600), 0.6); <-- The effect must be the same as the effect you load ("tree")
}
}
New Script:
trigger_damage responds to damage
main()
{
thread boom();
}
boomblaadjes() <-- This should be the same as above: boom()
{
trig = getent("leaves","targetname");
while (1)
{
trig waittill ("damage", idamage);
{ <-- This doesn't do anything
level._effect["tree"] = loadfx ("fx/impacts/leafs.efx"); <-- This should be loaded before the script is loaded
maps\mp\_fx::loopfx("leafs", (912, -16, 600), 0.6); <-- The effect must be the same as the effect you load ("tree")
}
}
New Script:
Code: Select all
main()
{
level._effect["tree"] = loadfx ("fx/impacts/leafs.efx");
thread boom();
}
boom()
{
trig = getent("leaves","targetname");
while(1)
{
trig waittill ("damage", idamage);
maps\mp\_fx::loopfx("tree", (912, -16, 600), 0.6);
}
}
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Script help plz
Why not use playfx instead of loopfx, with that script it will constantly play that effect until the map ends once it is hit.
Also, I can't say this enough, please have your map name in front of the targetname. This helps avoid conflicting with other maps.
Also, I can't say this enough, please have your map name in front of the targetname. This helps avoid conflicting with other maps.
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]
"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]
Re: Script help plz
beeep error the map loads but when i shoot @ the tree script compile error
-
- Core Staff
- Posts: 13313
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: Script help plz
I didnt change it because I just accepted the possibility one bullet of damage would loop an FX forever, but if it is a one-off effect, then yes playFx is better.Nightmare wrote:Why not use playfx instead of loopfx, with that script it will constantly play that effect until the map ends once it is hit.
Also, I can't say this enough, please have your map name in front of the targetname. This helps avoid conflicting with other maps.
change:
Code: Select all
maps\mp\_fx::loopfx("tree", (912, -16, 600), 0.6);
Code: Select all
maps\mp\_fx::playfx("tree", (912, -16, 600));
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
Re: Script help plz
or you could do this
Code: Select all
origin= getent("origin","targetname");
trig = getent("trigger","targetname");
effect = loadfx("fx/impacts/leafs.efx");
trig waittill ("trigger");
playfx(effect,origin.origin);
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]
"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]
Re: Script help plz
It doesn't work with playfx it says unknown what i must do something like that
and when i do like nightm. it crashes script compile error
Can anyone make al ittle .map and a .gsc with _fx and the script
Sorry but i can't get it working plz with
level._effect["tree"] = loadfx ("fx/impacts/leafs.efx");
whit that fx plz
Thanks
Bye gun.
and when i do like nightm. it crashes script compile error
Can anyone make al ittle .map and a .gsc with _fx and the script
Sorry but i can't get it working plz with
level._effect["tree"] = loadfx ("fx/impacts/leafs.efx");
whit that fx plz
Thanks
Bye gun.
Who is online
Users browsing this forum: No registered users and 43 guests