PatmanSan Unlimited

eXtreme+ Modding => COD4 Tutorials => Topic started by: topg3ar on January 24, 2011, 07:36:59 am

Title: Linking FX to player?
Post by: topg3ar on January 24, 2011, 07:36:59 am
Hey all.

Is it possible to link an effect to a player so it constantly plays in the same spot?
Right now I'm using, as a test:

while( 1 )
{
   PlayFX( level._effect[ "nohead_bloodspray" ], self getTagOrigin( "j_head" ) );
   wait( 0.001 );
}

But the effect lags behind sometimes/jerks forwards.
Or is there a different way I can go about this? I've tried using playLoopedFX but that only plays at the initial position it is started at.

Thanks for any help.

Top
Title: Re: Linking FX to player?
Post by: 105HolyMoly on January 24, 2011, 09:39:29 am
:? I don't know what your trying to achieve but try:

playfxontag( level.fx_nohead_bloodspray, self, "tag_j_head" );


You may also need this at the top of your gsc file:

#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include common_scripts\utility;


Fred
Title: Re: Linking FX to player?
Post by: topg3ar on January 24, 2011, 05:11:14 pm
I want an effect to play constantly at the players head when you shoot it off:

http://www.xfire.com/video/3faaaa/

So I need it to kinda link to the head and play exactly on that spot every time. Using a while loop as I previously tried made it lag behind and forwards
because of the waiting.

hopefully the video will clear up what im trying to do
Title: Re: Linking FX to player?
Post by: 105HolyMoly on January 24, 2011, 09:12:23 pm
Use the playfxontag and in your soundalias make the sound looping. Once dead then kill the looping sound with a waittildeath.