TA: Kingdoms Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Welcome to TA: Kingdoms
 
HomePortalGallerySearchLatest imagesRegisterLog in

 

 Charging Weapons - Fix

Go down 
2 posters
AuthorMessage
DeeKay
Administrator
DeeKay


Posts : 531
Reputation : 26
Join date : 2011-03-19
Age : 25
Location : Brazil - SP

Charging Weapons - Fix Empty
PostSubject: Charging Weapons - Fix   Charging Weapons - Fix EmptyFri Oct 25, 2019 11:35 pm

Have you ever wondered why some weapons are chargeable, like Thirsha 2nd/3rd attacks, and others are not, like Elsin meteor?

This happens because in Elsin animation script (.cob file), when you stop aiming by pressing S or start moving in a different direction, the following is called:

Code:
TargetCleared(Func_Var_1)
{
    set WEAPON_AIM_ABORTED to Static_Var_10;
    kill_attack = TRUE;
    signal SIG_AIM;
    return;
}

and before any attack, there is a check whether kill_attack is true or not:

Code:
if( !kill_attack )
{
    set WEAPON_LAUNCH_NOW to Func_Var_1;
    play-sound( "SWOOSH6", PLAYSOUND_PRIORITY_BATTLE );
}

Basically, what it says is: Target is cleared, your attack won't be launched.

Also, kill_attack var is set to false before starting the fire weapon animation:

Code:
FireWeapon(Func_Var_1)
{
    firing = TRUE;
    kill_attack = FALSE;
    //...
}

Thirsha and units that can charge weapons don't have this. So that's how you fix it, if you don't want your weapons to be chargeable, make a variable to control when your attack can be launched or not.
Back to top Go down
http://alltakdownloads.6te.net/
Sage
Lead Designer of The New Era Expansion Project
Sage


Posts : 1226
Reputation : 8
Join date : 2008-08-02
Age : 37
Location : West Haven

Charging Weapons - Fix Empty
PostSubject: Re: Charging Weapons - Fix   Charging Weapons - Fix EmptySat Oct 26, 2019 4:58 pm

DK, what do you mean by chargeable?
Back to top Go down
https://takuniverse.webs.com/
DeeKay
Administrator
DeeKay


Posts : 531
Reputation : 26
Join date : 2011-03-19
Age : 25
Location : Brazil - SP

Charging Weapons - Fix Empty
PostSubject: Re: Charging Weapons - Fix   Charging Weapons - Fix EmptySun Oct 27, 2019 4:48 pm

You can charge, "hold" it with Thirsha/Dark Priest then it'll be released as soon as an enemy gets in range, it's similar to back-attacking, but back-attacking doesn't always charge the weapon (thirsha 1st weapon).

Back to top Go down
http://alltakdownloads.6te.net/
Sponsored content





Charging Weapons - Fix Empty
PostSubject: Re: Charging Weapons - Fix   Charging Weapons - Fix Empty

Back to top Go down
 
Charging Weapons - Fix
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TA: Kingdoms Forums :: GENERAL :: Tutorials-
Jump to: