Post: Playing Claymore Laser FX Issues
02-04-2016, 09:35 PM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); So I made a script that plays the Claymore laser FX on all body parts of the player. This works but the amount of lasers spawned is a lot (obviously due to the loop) and they are not attached to the player. After a while, the lasers stop spawning too because too many already exist already. I'm wondering how to fix this to attach to the player or how to delete the spawned lasers again. They just stay in the air. The script was made for the Zombies mode and here it is:

    laserMan()
{
self endon("disconnect");

effect = level._effect["claymore_laser"];

while(true)
{
playEffectAllBodyParts(effect);
wait 0.05;
}
}

playEffectAllBodyParts(effect)
{
tagOrigins = strTok("j_head|j_spineupper|j_spinelower|j_spine4|j_spine1|J_Elbow_RI|J_Elbow_LE|j_knee_le|j_knee_ri|J_Ankle_LE|J_Ankle_RI|J_Wrist_RI|J_Wrist_LE", "|");

foreach(tagOrigin in tagOrigins)
{
origin = self getTagOrigin(tagOrigin);
playFX(effect, origin);
}
}


Thank you Happy
(adsbygoogle = window.adsbygoogle || []).push({});
02-09-2016, 01:15 AM #11
Originally posted by jwm614 View Post
Spawnfx
Triggerfx


curious about fxs lately, what difference between PlayFX() and These SpawnFX()/TriggerFX()
what do they do?
02-09-2016, 01:27 AM #12
jwm614
NextGenUpdate Elite
Originally posted by OfficialCoolJay View Post
curious about fxs lately, what difference between PlayFX() and These SpawnFX()/TriggerFX()
what do they do?


self.ef = spawnfx(effect, position) Create an effect entity that can be re-triggered efficiently at arbitrary intervals. This doesn't play the effect. Use delete to free it when done.
triggerfx(self.ef)Replays the effect associated with the effect entity. This does not kill any existing effects.
self.ef delete() deletes the fx
playfx(effect, positon) plays effect on world positon

The following 2 users say thank you to jwm614 for this useful post:

BullyWiiPlaza, OfficialCoolJay
02-09-2016, 02:52 AM #13
Originally posted by jwm614 View Post
self.ef = spawnfx(effect, position) Create an effect entity that can be re-triggered efficiently at arbitrary intervals. This doesn't play the effect. Use delete to free it when done.
triggerfx(self.ef)Replays the effect associated with the effect entity. This does not kill any existing effects.
self.ef delete() deletes the fx
playfx(effect, positon) plays effect on world positon


thanks m8 Winky Winky

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo