SphereCommunity
Freeze on cast - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Freeze on cast (/Thread-Freeze-on-cast)



Freeze on cast - Indiaret - 12-05-2019 04:14 AM

Hi,

trying to do an ability when you have more damage with spells while you turn on this ability, but want to do you cannot move while casting spells with turned on ability. Its risky ability for more damage. So that's my problem. Cannot solve 'freeze on cast' with turned on ability.

Tried Statf_Freeze - cannot be used, because then I cannot use bandages, potions and more stuffs that i want to. That is undiserable.

In old sphere there was @step for characters, but sadly not exists here.

Have one solution ... through tag (1/0 - on/off) i create item with timer which controlls my position change. It works somehow, but not so clear and clever as you can see in the code below.


I would appreciate if somebody have better solution on my case.

Thank you very much




RE: Freeze on cast - Coruja - 12-05-2019 08:04 AM

try using the hardcoded TAG.NoMoveTill

Code:
ON=@SpellCast
TAG.NoMoveTill=<eval <SERV.TIME>+<ARGN3>>

or to make the code more reliable you must also handle spell fail/abort

Code:
ON=@SpellCast
TAG.NoMoveTill=<eval <SERV.TIME>+10000>

ON=@SpellSuccess
TAG.NoMoveTill=

ON=@SpellFail
TAG.NoMoveTill=



RE: Freeze on cast - Indiaret - 12-06-2019 08:50 AM

It works ! Amazing, elegant and simple, thank you Coruja.