UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: A-Grand on October 28, 2014, 08:31:59 am

Title: Zapper FX not showing up
Post by: A-Grand on October 28, 2014, 08:31:59 am
hi

I have a trap in my map that works and everything, but it does not show the FX...

look at the handle, and the light changes color when it's on...
(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi59.tinypic.com%2Fx36c28.jpg&hash=0bf61960cf1d8b3a63ed58957a9495a7b7c58f82)

It does kill players and zombies...
(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi57.tinypic.com%2F2d0fcbq.jpg&hash=c957318b30629975c9cb11fdf6f492fb3b1fe91e)

Only the FX not showing up...
Anyone have any idea how to fix this?  ???

Thx
Title: Re: Zapper FX not showing up
Post by: HitmanVere on October 28, 2014, 10:11:55 am
You might have commented out the FX from zone_source or you dont have the FX at all
Title: Re: Zapper FX not showing up
Post by: A-Grand on October 28, 2014, 12:23:51 pm
You might have commented out the FX from zone_source or you dont have the FX at all

is it one of these?

Code Snippet
Plaintext
//ESM - added for electrical trap
fx,misc/fx_zombie_electric_trap
fx,env/electrical/fx_elec_sparking_oneshot
fx,misc/fx_zombie_zapper_powerbox_on
fx,misc/fx_zombie_zapper_wall_control_on
fx,maps/zombie/fx_zombie_light_glow_green
fx,maps/zombie/fx_zombie_light_glow_red
fx,misc/fx_zombie_elec_trail_oneshot
fx,env/electrical/fx_elec_wire_spark_dl_oneshot
fx,env/electrical/fx_elec_player_md
fx,env/electrical/fx_elec_player_sm
fx,env/electrical/fx_elec_player_torso
fx,misc/fx_zombie_elec_gen_on
fx,misc/fx_zombie_elec_gen_idle
xmodel,zombie_zapper_cagelight_red
xmodel,zombie_zapper_cagelight_green
Title: Re: Zapper FX not showing up
Post by: HitmanVere on October 28, 2014, 01:03:25 pm
is it one of these?

Code Snippet
Plaintext
//ESM - added for electrical trap
fx,misc/fx_zombie_electric_trap
fx,env/electrical/fx_elec_sparking_oneshot
fx,misc/fx_zombie_zapper_powerbox_on
fx,misc/fx_zombie_zapper_wall_control_on
fx,maps/zombie/fx_zombie_light_glow_green
fx,maps/zombie/fx_zombie_light_glow_red
fx,misc/fx_zombie_elec_trail_oneshot
fx,env/electrical/fx_elec_wire_spark_dl_oneshot
fx,env/electrical/fx_elec_player_md
fx,env/electrical/fx_elec_player_sm
fx,env/electrical/fx_elec_player_torso
fx,misc/fx_zombie_elec_gen_on
fx,misc/fx_zombie_elec_gen_idle
xmodel,zombie_zapper_cagelight_red
xmodel,zombie_zapper_cagelight_green

fx,env/electrical/fx_elec_sparking_oneshot This one I believe
Title: Re: Zapper FX not showing up
Post by: MakeCents on October 28, 2014, 01:35:35 pm
fx,env/electrical/fx_elec_sparking_oneshot This one I believe

I think one shot is an electric spark, isn't it? I'm not at my pc but I thought it was this one: misc/fx_zombie_electric_trap

Looks like this in dlc3_code.gsc
Code Snippet
Plaintext
level._effect["zapper"]					= loadfx("misc/fx_zombie_electric_trap");

If that isn't the issue, there was an issue with the standard script before. I'm not sure which you are using. You can see here in an old post:
http://www.zombiemodding.com/index.php?topic=2822.0 (http://www.zombiemodding.com/index.php?topic=2822.0)

Unfortunately the links are all broken.
Title: Re: Zapper FX not showing up
Post by: A-Grand on October 28, 2014, 04:28:19 pm
I think one shot is an electric spark, isn't it? I'm not at my pc but I thought it was this one: misc/fx_zombie_electric_trap

Looks like this in dlc3_code.gsc
Code Snippet
Plaintext
level._effect["zapper"]					= loadfx("misc/fx_zombie_electric_trap");

If that isn't the issue, there was an issue with the standard script before. I'm not sure which you are using. You can see here in an old post:
http://www.zombiemodding.com/index.php?topic=2822.0 (http://www.zombiemodding.com/index.php?topic=2822.0)

Unfortunately the links are all broken.

I have that line in my dlc3_code.gsc and also have those FX lines in zone_source.
still have no idea why it's not showing up :(

I'll try some things, thank you both.
Title: Re: Zapper FX not showing up
Post by: Harry Bo21 on October 28, 2014, 09:03:09 pm
are you using ignore files?

If you are, maybe its in there
Title: Re: Zapper FX not showing up
Post by: A-Grand on October 29, 2014, 04:46:13 am
are you using ignore files?

If you are, maybe its in there

I checked, it only got sfx and voiceovers.
Title: Re: Zapper FX not showing up
Post by: jjbradman on October 29, 2014, 09:55:32 pm
do the script you're using sets the angle something like this?

Code Snippet
Plaintext
zapperfx_origin.angles = (-90,0,0);

i dont remember if it was correct like that but you need that -90 for it to be vertical(cause in my case it was underground lol) also theres one zapper fx which doesnt play, but i dont remember well. if you need more help ill look into my files  :)
Title: Re: Zapper FX not showing up
Post by: A-Grand on October 30, 2014, 04:11:22 am
I finally managed to get it to work.
Code Snippet
Plaintext
 
self.tag_origin setmodel("tag_origin");
playfxontag(level._effect["zapper"],self.tag_origin,"tag_origin");
these two lines were commented out. I simply removed "//" and now it works in the game.
Also, instead of using a script_struct (which is linked to the trap trigger) in radiant, I used script_origin.

do the script you're using sets the angle something like this?

Code Snippet
Plaintext
zapperfx_origin.angles = (-90,0,0);

i dont remember if it was correct like that but you need that -90 for it to be vertical(cause in my case it was underground lol) also theres one zapper fx which doesnt play, but i dont remember well. if you need more help ill look into my files  :)

Please do. This might help with the FX being off few grids in the game.
Thanks :)
Title: Re: Zapper FX not showing up
Post by: Harry Bo21 on October 30, 2014, 04:26:33 am
ah so it wasnt not loaded, it was the call to the FX that was commented out

So the engine loaded it, but nothing called for it to display

Glad it worked out for ya ;)