Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File
Line
Function
/inc/functions.php
3388
errorHandler->error
/showthread.php
116
build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File
Line
Function
/inc/functions.php
3331
errorHandler->error
/inc/functions.php
3324
build_forum_breadcrumb
/showthread.php
195
build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
RE: Swing swinging at record of the fight + source
Hello Coruja, thanks very much for response. Sorry if i did not stated it more clearly before.
This is the way i see things in combat by checking source code:
war_swing_swinging: i take iswingdelay from weapon selected and wait until time is over.(the more weight more iswingtime, if twohand more iswingtime even, saying it fast and bad ---> using sphere custom formula). (bardiche can take 8,7 seconds and halberd 10 just an example).
war_swing_ready: ok now iswingdelay time is over, i´m ready to hit, if i have my opponent near my attack anim will show up and will hit or miss to player, if not i´ll be holding the hit waiting to be near and hit/miss in that precision time i´m close to my opponent.
war_swing_equipping: recoil anim and we say swing is finished.
When war_swing_equipping ends I call again war_swing_swinging if i keep the intend to hit again.
That´s how I would like it to run it. Actually when I try to hit for first time a player my character starts the fight in war_swing_ready instead of war_swing_swinging because @HitTry is called when war_swing_ready takes place in action.
I commit a mistake by don´t telling that im using sphere custom combat formulas but I tweaked some things like this that would answer your question about how iswingdelay and animdelay works in my system, take a look at //MOD. comments:
Code:
// Start the swing
if ( m_atFight.m_War_Swing_State == WAR_SWING_READY )
{
if ( !CanSeeLOS(pCharTarg) )
return WAR_SWING_EQUIPPING;
ANIM_TYPE anim = GenerateAnimate(ANIM_ATTACK_WEAPON);
int animDelay = 14; // MOD.
int iSwingDelay = g_Cfg.Calc_CombatAttackSpeed(this, pWeapon) - 1; // swings are started only on the next tick, so substract -1 to compensate that
My animdelay is always the same for every weapon but not it´s argn1 for each on @Hittry, just like 51a. I made an event that involved all weapons from second age assigning a custom argn1 value like if (<argo.baseid>==i_bardiche) argn1=87 endif… I don´t care about the formula because i know in seconds how they should work.
It takes 0,014/0.01 = 1,4 seconds to display the whole anim (forward swing plus recoil anim) because that:
So it´s not working really like sphere custom, I made this “cheap trick” to accomplish my targets, it´s all about like reverse engeenering looking through older versions.
So just realize that animdelay is the same for every weapon in my system, but iswingspeed is different for each other.
My problem comes when I want to start a fight and with the first hit. There is no iswingdelay called before hitting the opponent for first time, anim comes as fast as I double click player in war mode and once hit or miss iswingdelay is now coming but not in first hit.
Here are some vids with the differences between versions more easy so you can check out by yourself better. in 0.56c when player says current time it is the time that the swing took to complete (argn1 in hittry trigger). Also be aware that attacks starts for me when player turn blue just before double clicking him in war mode.
0.56c:
0.51a (the way i want)
Thanks for your time again, i hope you see better this time. Greetings mate.
(This post was last modified: 02-17-2016 09:48 AM by Mad Gunther.)