UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

wave gun death anim help

HOT
broken avatar :(
Created 10 years ago
by Noahst
0 Members and 1 Guest are viewing this topic.
7,494 views
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
it handles all the functionality of the gun, but the most it does to the zombies beyond that is "mark" them as "killed by tesla"

then in zombiemode ( or zombiemode_spawner, i forget ) theres a death control event, but it "checks" if the zombie was killed by tesla, and if so, causes them to do the tesla death anim

another thing the main script does is "prevent" normal points from using the waffe, coz its capped, beyond that, the script actually does very little except kill a zombie, chain to other zombies and finally mark them as "killed by tesla" so that the "normal logic" then uses the tesla death

the same theory is used for the thundergun, as that also uses fling backs and knock downs by "marking" that the zombie was hit by the TG

the waffe has a function in its script along these lines

Code Snippet
Plaintext
enemy_killed_by_tesla()
{}

then if you search that in zombiemode_spawner, youll find that being called, and telling it to abandon the normal logic, and do a tesla death insteadsomething like this

Code Snippet
Plaintext
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
}
Last Edit: December 15, 2015, 11:46:49 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Signature
If you enjoy my work, feel free to donate!

https://www.paypal.me/Stainbrook762
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
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
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
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
your not listening

any script, or weapon that "uses" those death anims, is going to be trying to do your new anim instead

so if a zombie walks into a electric trap - they will die like a wave gun

if you get the thundergun of CFG - they will die like a wave gun

if you get any electric cherry of this site - they will die like a wave gun

look at the script "properly" and "assign your OWN death anim to be used - if - killed by wave gun". Not just swap the names around because they are not "just" for the tesla, its for "electric death" of any kind, or often called by most custom scripts around here

and as ive said, the anims need defining for the zombies, sounds like all youve done is compile them into the FF and add them to the anim tree - this is not the full process

level._scr_anims[ "zombie"]["animname" ] = %animname;

something like that, look in zombiemode.gsc, they can be added anywhere but this is where treyarch did it for cod 5 ( in bo1, for the shangrila bosses, its done "within" their own script rather than there, same for the other bosses )
Last Edit: December 16, 2015, 12:03:18 am by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
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

Double Post Merge: December 16, 2015, 12:06:25 am
so yes, technically i changed all the effects, BUT i changed the target weapon in the file and renamed the file itself to wavegun.gsc to avoid such conflicts
Last Edit: December 16, 2015, 12:06:25 am by Noahst
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
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
no you still dont get it, because "again" you have said "so i changed the name from tesla to wavegun"...

renaming a script - means nothing, because your trying to change "the anims that the tesla calls"

so no matter what, doing it this way - its going to effect the others because you are OVERWRITING the anims, the "script" is totally irrelevent

and at that, you havent actually overwritten them because despite me saying 3 times now that you need to define them along with the other zombie anims in zombiemode.gsc or define them yourself, your still hooked on a script name lol

Code Snippet
Plaintext
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;

you need this^^^^^^^^^

( ps not exact code, done from memory, go look at the script, if you "insist" on overwriting the tesla stuff then go find this section of code and change the names of the anims because they are still referencing the old ones, but this IS a bad idea when adding your own is just a simple and wont f&^% with everything else like this will )
Last Edit: December 16, 2015, 12:11:52 am by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
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.
Last Edit: December 16, 2015, 12:13:30 am by Noahst
broken avatar :(
  • steviewonder87
  • Deleted Member
×
broken avatar :(
steviewonder87
This user is deleted :(
i mean ive done it with a bunch of other weapon anims and they work fine in game

First off, how did you extract the wave gun death anims then? You used Lemon right? (No other way that I know of)

Lemon exports tanims only, not xanims. Weapon xanims in BO1 are in the mod tools (not for DLC like the wave gun) but they still need to be converted for WAW (easy with another of Tom's tools) and so the process is completely different.

Not to mention AI tanims (like Harry said) usually require a ton more work to port over than normal weapon anims since they are normally a bit fucked when exported with Lemon.
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
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.
i give up lol, your not understanding what im saying

 the "animiations zombies do" are set and defined in zombiemode.gsc or zombiemode_spawner.gsc

all the tesla script does is tell it to play them - you can "tell it to play yours" as you are but its doing "nothing" because you "have not defined them" OR "manually called them instead". Unless your changing them there ( or "add them" as i keep saying ), your script is doing exactly nothing, and they will continue dying like a tesla death until you go look at the part of zombiemode.gsc ive pointed out now 3 times

Code Snippet
Plaintext
level.scr_anims[ "zombie" ][ "tesla" ] = [];
level.scr_anims[ "zombie" ][ "tesla" ][ 0 ] = %animname;
level.scr_anims[ "zombie" ][ "tesla" ][ 1 ] = %animname;

"if" you changed these, then any "was killed by tesla" event will doe your anims instead, but this "is why" it is a problem, because other stuff usese that too, you would need to ADD YOUR OWN


Code Snippet
Plaintext
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;

Code Snippet
Plaintext
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 ] );
}




Code Snippet
Plaintext
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;
}


failing that you need to "at least" call the animations "manually"

playAnim( %ANIMNAME, "", "" ); etc
Last Edit: December 16, 2015, 12:30:43 am by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
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
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
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
literally the way most custom weapon death anims work is they set a variable on the zombie, thats pretty much it

then the death event handler checks for all the different kinds of deaths it "could" be, and plays the appropriate one

Its coz these are not "for" the tesla gun, the tesla just "uses them too" ( originally these were for the electric trap in verruct, an entire map before the DG2 was scripted )

* ps - weapons that do this but "might not kill" also "unset" the variable after a frame or something. Its just so the zombie itself is carrying a property telling the script what it was hit/killed "by"


Not sure if itll help but i covered this in the instructions for my thundergun. You can have and look at that ( or off CFG as i believe its on there now  :-X )
Last Edit: December 16, 2015, 12:40:46 am by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
ok so basically i just need a section on zombiemode.gsc that tells what effect to play when a zombie dies by the wavegun
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
ok so basically i just need a section on zombiemode.gsc that tells what effect to play when a zombie dies by the wavegun

Code Snippet
Plaintext
level.scr_anims[ "zombie" ][ "wavegun" ] = [];
level.scr_anims[ "zombie" ][ "wavegun" ][ 0 ] = %animname;
level.scr_anims[ "zombie" ][ "wavegun" ][ 1 ] = %animname;

^ No you need this "anywhere" they are just "already" set up in zombiemode.gsc and you can add to it there

and you need to edit the death event to do your new death

and edit the wavegun script to mark a zombie as dying by those means
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
alright thanks for being patient with me, im gunna go mess with that

Double Post Merge: December 16, 2015, 02:17:23 am
ok so it shoots fine, but the impacts do nothing
Last Edit: December 16, 2015, 02:17:23 am by Noahst

 
Loading ...