SphereCommunity
MESSAGE in @GETHIT & TIMERF STOP doesn't work - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: MESSAGE in @GETHIT & TIMERF STOP doesn't work (/Thread-MESSAGE-in-GETHIT-TIMERF-STOP-doesn-t-work)



MESSAGE in @GETHIT & TIMERF STOP doesn't work - FiLoUs64 - 12-20-2019 01:39 PM

Hi Bye

I have custom spell scripted and want to show a message when player received a hit during the casting delay.

Code:
[EVENTS e_customcastartificier]
on=@gethit
TIMERF STOP, f_explosion_artificier
MESSAGE Vous ratez votre incantation.  
EFFECT=3,i_fx_smoke_small,6,30,1
EVENTS -e_customcastartificier
SFX=005c
RETURN 0

2 problems :

- MESSAGE is always see only by the the character responsible of the damage. It show up the head of character who received the damage but are not see by this one.

- TIMERF STOP don't work. TIMERF CLEAR works. Is syntax OK or there a problem?

Thanks for your help!


RE: MESSAGE in @GETHIT & TIMERF STOP doesn't work - darksun84 - 12-20-2019 06:54 PM

If i remember well, if you have passed argument to f_explosion_artificier you have to add them in the timerf stop f_explosion_artificier.


Message are always sent to the SRC, in @gethit SRC is the one that did the damage, so you have to use
trysrc <uid> message Vous ratez votre incantation.


RE: MESSAGE in @GETHIT & TIMERF STOP doesn't work - Coruja - 12-22-2019 05:20 AM

To check if char is casting spells you must check char action
Code:
ON=@GetHit
IF (<ACTION> == skill_magery)
  ...
ENDIF

Also note that MESSAGE is only sent to the char itself and related SRC. To show the message to everyone nearby you must use SAY instead MESSAGE

And both TIMERF STOP and TIMERF CLEAR exists, but you must use the correct syntax for each one
  • TIMERF CLEAR --> this will make the char clear all active TIMERF's
  • TIMERF STOP f_something --> this will make the char stop only "TIMERF f_something"