![]() |
Combat - swing timer - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Combat - swing timer (/Thread-Combat-swing-timer) |
Combat - swing timer - Indiaret - 03-02-2019 03:03 AM Hi, Trying to make swing delay between triggers hittry and hit, and cannot resolve it. Using sphere 56d. I tried timerd, argn1 in @HitTry but nothing works for it. Still same fast attack no matter what is in this variables. In @SkillStart timerd works properly for swing delay. Is there any error or how can i change it ? Tried also local.animDelay, but it dont work precisely. I have this source code for combat: Code: [events e_combat_test] Thanks. RE: Combat - swing timer - Coruja - 03-02-2019 04:33 AM combat swing have 2 stages: the anim (hit) delay and the total swing delay the anim delay (LOCAL.AnimDelay) is always 7ms and then the char keep waiting the reimaining delay (ARGN1) until next swing. Eg: if your attack have swing delay 2.0s, the char will deal the damage at 0.7s and will keep waiting more 1.3s to start next swing so you must balance these 2 values (LOCAL.AnimDelay and ARGN1) when customize swing delay on @HitTry trigger. Also note that these values can be only changed on @HitTry trigger RE: Combat - swing timer - Indiaret - 03-02-2019 05:49 AM Thanks for answer ... but that its problem. LOCAL.Animdelay works correctly like u wrote, but argn1 do not. Eg: I have now in script: Local.animdelay=30 and argn1=100 in trigger @HitTry. ... So my character should deal damage after 3s according to LOCAL.AnimDelay and wait to trigger @Hit next 7s according to argn1, right ? It dont work if I understood well ![]() Argn1 have not influence on this. Exactly after 3s it deal damage and combat repeats again. RE: Combat - swing timer - Coruja - 03-02-2019 08:29 AM try check if you don't have any other event/trigger conflicting with @HitTry / ARGN1 value, I did some quick tests here using this example below and it seems to be working fine Code: [EVENTS e_char_event_test] RE: Combat - swing timer - Indiaret - 03-02-2019 10:21 PM Tried your event ... it works only if u have not other triggers, because argn1 does not stop other triggers. After hit, so after LOCAL.AnimDelay (3s), it starts next triggers ... so @Hit, @SkillAbort, @SkillPreStart and @SkillStart it waits chosen 7s in this trigger. I have @SkillStart with timerd so it interrupted our argn1 with this, right ? Argn1 in my case can't work properly. Second problem that Local.animDelay have not synchronized hit with animation. It hits after animation has ended. Hit should be in the middle of animation when i swing exactly close to the character. Is it possible to delay it somehow ? RE: Combat - swing timer - Coruja - 03-10-2019 08:17 AM probably the TIMER / TIMERD on your script is messing with sphere default action timer. Usually it's not a good idea set an TIMER value directly on chars to avoid conflict with hardcoded values, so if you're already using ARGN1 / LOCAL.AnimDelay on @HitTry trigger, this will already set the char action timer so you don't need to set TIMER=x again |