Author Topic: Linking FX to player?  (Read 389 times)

Offline topg3ar

  • Rank: Private
  • *
  • Posts: 33
Linking FX to player?
« 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

Offline 105HolyMoly

  • Rank: Private
  • *
  • Posts: 188
    • http://holymolymods.com
Re: Linking FX to player?
« Reply #1 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

Offline topg3ar

  • Rank: Private
  • *
  • Posts: 33
Re: Linking FX to player?
« Reply #2 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

Offline 105HolyMoly

  • Rank: Private
  • *
  • Posts: 188
    • http://holymolymods.com
Re: Linking FX to player?
« Reply #3 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.