Modme Forums

Playing Fire Fx on Zombies Head

Game Modding | Call of Duty: Black Ops 3 | Scripting


prtyboy76:

So I have tried many things in the past to play an fx on the zombies heads but it never worked I know it must be pretty simple but any help would be appreciated


Spiki:

permanantly or at a specific time?


prtyboy76:

permanantly or at a specific time?

permanantly


Spiki:

All is done in mapname.CSC

slap this on top:

#using scripts\shared\ai_shared;


#precache( "client_fx", "fx/path" );


This in function main:
ai::add_archetype_spawn_function( "zombie", &zom_fire_head );

And this at the bottom:
function zom_fire_head(localClientNum)
{
self.head_fire_fx = PlayFXOnTag( localClientNum, "that fx from before", self, "j_head" );
}


!!!Add fx to zone


*didnt test*


prtyboy76:

All is done in mapname.CSC

slap this on top:
#using scripts\shared\ai_shared;


#precache( "client_fx", "fx/path" );


This in function main:
ai::add_archetype_spawn_function( "zombie", &zom_fire_head );

And this at the bottom:
function zom_fire_head(localClientNum)
{
self.head_fire_fx = PlayFXOnTag( localClientNum, "that fx from before", self, "j_head" );
}


!!!Add fx to zone


*didnt test*

Oh cool thank you and for the precache do i change anything with it and how do i add the fx in the zone


FrostIceforge:

Oh cool thank you and for the precache do i change anything with it and how do i add the fx in the zone


idk if you're using a custom FX or a Treyarch FX, but the built in 30x30 one might work.

To try it, make your precache line this:
#precache( "fx", "fire/fx_fire_barrel_30x30" );

When using a built in Treyarch FX, you shouldn't need to add it to zone.

If you're using your OWN FX, then in the zone do something like this:
fx,path/your_fire_fx.efx
Where your path is the series of folder names after BO3ROOT/share/raw/fx that leads to your efx file, and your_fire_fx.efx is of course the file name.
Then precache like this:
#precache( "fx", "path/your_fire_fx" );
And note how you don't use the .efx suffix.


prtyboy76:

idk if you're using a custom FX or a Treyarch FX, but the built in 30x30 one might work.

To try it, make your precache line this:
#precache( "fx", "fire/fx_fire_barrel_30x30" );

When using a built in Treyarch FX, you shouldn't need to add it to zone.

If you're using your OWN FX, then in the zone do something like this:
fx,path/your_fire_fx.efx
Where your path is the series of folder names after BO3ROOT/share/raw/fx that leads to your efx file, and your_fire_fx.efx is of course the file name.
Then precache like this:
#precache( "fx", "path/your_fire_fx" );
And note how you don't use the .efx suffix.

does the precache need to be at the top of csc and I also keep getting errors


FrostIceforge:

does the precache need to be at the top of csc and I also keep getting errors

It needs to be after your #using stuff at the top but before anything else.
What kind of errors? Dump them here. We can't do anything if we don't know which errors they are.


prtyboy76:

It needs to be after your #using stuff at the top but before anything else.
What kind of errors? Dump them here. We can't do anything if we don't know which errors they are.

********************************************************************************



UNRECOVERABLE ERROR:

^1SCRIPT ERROR: No generated data for 'scripts/zm/zm_maxs_cafe.csc'

ERR(0) scripts/zm/zm_maxs_cafe.csc (5,6) : syntax error, unexpected TOKEN_USING, expecting $end : #using





Linker will now terminate.

********************************************************************************


prtyboy76:

It needs to be after your #using stuff at the top but before anything else.
What kind of errors? Dump them here. We can't do anything if we don't know which errors they are.

********************************************************************************

UNRECOVERABLE ERROR:

^1Non-client specific token 'fx' found in clientscript scripts/zm/zm_maxs_cafe.csc





Linker will now terminate.

********************************************************************************


FrostIceforge:

********************************************************************************



UNRECOVERABLE ERROR:

^1SCRIPT ERROR: No generated data for 'scripts/zm/zm_maxs_cafe.csc'

ERR(0) scripts/zm/zm_maxs_cafe.csc (5,6) : syntax error, unexpected TOKEN_USING, expecting $end : #using





Linker will now terminate.

********************************************************************************

Does line 4 end with a semicolon?


prtyboy76:

Does line 4 end with a semicolon?

Ye so I put the using at the top and put precache under zm_usermap; in usings and no more errors but when I load in nothing happend


Spiki:

it should be

#precache( "client_fx", "fire/fx_fire_barrel_30x30" ); 
fx for gsc
client_fx for csc


prtyboy76:

it should be
#precache( "client_fx", "fire/fx_fire_barrel_30x30" ); 
fx for gsc
client_fx for csc

Do I need anything else in GSC because its still not working


prtyboy76:

it should be
#precache( "client_fx", "fire/fx_fire_barrel_30x30" ); 
fx for gsc
client_fx for csc

Do i need a precache function in gsc