

Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
enemy_killed_by_tesla()
{}zombie_death_event()
{
if ( self maps\_zombiemode_tesla::enemy_killed_by_tesla() )
// killed by tesla, so do tesla death
// else do normal stuff from here
}![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
yeah that was my thought, my idea was to change it to if killed by wavegun, which i did, that way the _zombiemode_tesla still works with tesla weapons (i renamed the zombiemode_tesla that i switched to the wavegun to _zombiemode_wavegun). the _zombiemode_tesla that has wavegun defined as the target weapon is now called _zombiemode_wavegun, and i threaded it in _zombiemode.gsc and defined the death anims in generic_human.atr
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
i get what your saying. for example: electric cherry uses _zombiemode_tesla, just like the wunderwaffe. so i cant change the tesla gsc's anims to waveguns because itll play that effect for eveything else that uses it. thats why i renamed tesla.gsc to wavegun.gsc, then changed the target weapon to wave gun instead of telsa gun. then i changed the called effects to waveguns death anims. maybe im not understanding? lol i do follow things slow sometimes
level.scr_anims[ "zombie" ] = [];
level.scr_anims[ "zombie" ][ "walk" ] = [];
level.scr_anims[ "zombie" ][ "walk" ][ 0 ] = %animname;
level.scr_anims[ "zombie" ][ "walk" ][ 1 ] = %animname;
level.scr_anims[ "zombie" ][ "death" ] = [];
level.scr_anims[ "zombie" ][ "death" ][ 0 ] = %animname;
level.scr_anims[ "zombie" ][ "death" ][ 1 ] = %animname;
level.scr_anims[ "zombie" ][ "tesla" ] = [];
level.scr_anims[ "zombie" ][ "tesla" ][ 0 ] = %animname;
level.scr_anims[ "zombie" ][ "tesla" ][ 1 ] = %animname;i mean ive done it with a bunch of other weapon anims and they work fine in game
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
ahh i see, yes i originally did that. but i discovered pretty quick. i actually changed the effects in the script that it calls up to the waveguns, and the wavegun scripts are actually not the tesla effects.
Double Post Merge: December 16, 2015, 12:13:30 am
the tesla effects are independent effects called up in the original tesla.gsc.
level.scr_anims[ "zombie" ][ "tesla" ] = [];
level.scr_anims[ "zombie" ][ "tesla" ][ 0 ] = %animname;
level.scr_anims[ "zombie" ][ "tesla" ][ 1 ] = %animname;level.scr_anims[ "zombie" ][ "tesla" ] = [];
level.scr_anims[ "zombie" ][ "tesla" ][ 0 ] = %animname;
level.scr_anims[ "zombie" ][ "tesla" ][ 1 ] = %animname;
level.scr_anims[ "zombie" ][ "wavegun" ] = [];
level.scr_anims[ "zombie" ][ "wavegun" ][ 0 ] = %animname;
level.scr_anims[ "zombie" ][ "wavegun" ][ 1 ] = %animname;zombie_death_event()
{
if ( self maps\_zombiemode_tesla::enemy_killed_by_tesla() )
self playAnim( level.scr_anims[ "zombie" ][ "tesla" ][ 0 ] );
// do tesla death stuff
else if ( self maps\_zombiemode_wavegun::enemy_killed_by_wavegun() )
self playAnim( level.scr_anims[ "zombie" ][ "wavegun" ][ 0 ] );
// do wave gun death stuff
else
// Otherwise do NORMAL death stuff
self playAnim( level.scr_anims[ "zombie" ][ "death" ][ 0 ] );
}wave_gun_fired()
{
self waittill( "weapon_fired" );
// YOUR LOGIC HERE
if ( zombie is dead )
zombie.killed_by_wavegun = true;
}
enemy_killed_by_wavegun()
{
if ( isDefined( self.killed_by_wave_gun ) && self.killed_by_wave_gun )
return true;
else
return false;
}![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
oooh, ok no now i get what your saying. my understanding of it was that if a zombie died by the tesla gun it activated that script..my bad XD
)![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
ok so basically i just need a section on zombiemode.gsc that tells what effect to play when a zombie dies by the wavegun
level.scr_anims[ "zombie" ][ "wavegun" ] = [];
level.scr_anims[ "zombie" ][ "wavegun" ][ 0 ] = %animname;
level.scr_anims[ "zombie" ][ "wavegun" ][ 1 ] = %animname;