SphereCommunity
Fire Field - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Fire Field (/Thread-Fire-Field)



Fire Field - Art - 05-12-2013 03:54 PM

Hello. How i can recognize through @GetHit damage was from fire field?


RE: Fire Field - dagger4k - 05-12-2013 06:10 PM

on=@spelleffect
IF (<ARGN1>==28)
blah


RE: Fire Field - Art - 05-13-2013 06:11 AM

@GetHit


RE: Fire Field - RanXerox - 05-13-2013 06:20 AM

There is no reference to the item source of damage in @GetHit ... only the character source. So unless you put a TAG (or TAGs) on the character for each fire field they are responsible for you can not know.


RE: Fire Field - Ultima One - 05-13-2013 06:29 AM

I guess if you REALLY need it in @GetHit you could do something like

Code:
ON=@GetHit
FORITEMS 1
    IF (STRCMP(<ID>, i_fx_field_fire) == 0)
        // damage *could* have been from the fire field.
    ENDIF
ENDFOR

But, ofcourse, this just trigger when you receive damage and are stood on a fire field.. it does not guarantee the damage was caused by the fire field.. but I think that's the closest you are going to get by using @GetHit.

I might be wrong Ran, but if you tag the player with the fire fields they cast, you still wont know if the damage came from that fire field as you have nothing to check against - it would be the same scenario as using the LINK that fields have to their casters.


RE: Fire Field - Art - 05-13-2013 06:35 AM

Oh, thanks for advices.


RE: Fire Field - RanXerox - 05-13-2013 08:14 AM

True, you can't know for sure the damage came from the field... but if the source of the damage was a player who has a tag listing the fire field you are standing on, and the damage includes the fire flag, etc... it is likely.


RE: Fire Field - Wap - 05-13-2013 09:04 AM

(05-12-2013 06:10 PM)dagger4k Wrote:  on=@spelleffect
IF (<ARGN1>==28)
blah
(05-13-2013 06:11 AM)Art Wrote:  @GetHit
(fire field spell)
ON=@Effect
TAG.FFIELD=1

(chars, npcs)
ON=@GetHit
IF <TAG.FFIELD>
...
TAG.FFIELD=
ENDIF


RE: Fire Field - Rizz - 05-15-2013 09:57 AM

This should work:
PHP Code:
ON=@GETHIT
IF (<ARGN2>&dam_fire)
blablabla
ENDIF