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:
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.
Sage Lead Designer of The New Era Expansion Project
Posts : 1226 Reputation : 8 Join date : 2008-08-02 Age : 37 Location : West Haven
Subject: Re: Charging Weapons - Fix Sat Oct 26, 2019 4:58 pm
DK, what do you mean by chargeable?
DeeKay Administrator
Posts : 531 Reputation : 26 Join date : 2011-03-19 Age : 25 Location : Brazil - SP
Subject: Re: Charging Weapons - Fix Sun 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).