poison problem @Death trigger - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: poison problem @Death trigger (/Thread-poison-problem-Death-trigger) |
poison problem @Death trigger - sagitariuz2 - 02-28-2013 08:56 AM Hi, I was trying to script an event, to poison players in a radius around the killed npc. problem is: because of the npc dying, you get poison flagged and then after a second unflagged. no dmg at all. If I use the script with @GETHIT it works just fine. how to fix? Code: [EVENTS e_death_test] RE: poison problem @Death trigger - RanXerox - 02-28-2013 09:41 AM I am guessing because the source of that spell is <uid> and when <uid> dissapears, that source changes to yourself (and you can't damage yourself.) If that's true, maybe drop an invisible item on the ground, with the same name as the creature, and with an appropriate timer (and attributes) to eventually clean it up, and use the uid of that item as the source of the damage. RE: poison problem @Death trigger - sagitariuz2 - 03-01-2013 07:53 AM funny thing is: there are 2 uids being triggert. first the one of the npc and then the one of myself. so i guess its a bug? RE: poison problem @Death trigger - RanXerox - 03-01-2013 09:18 AM Probably not a bug since calling functions and using FOR* loops may change the context of references like I and SRC... which might explain the side-effects you are seeing. In your case, FORCHARS 8 equates to "for every character within 8 squares"... and you are a character too! If you want it to not EFFECT you, then you need an IF statement to check for that. RE: poison problem @Death trigger - sagitariuz2 - 03-01-2013 09:28 AM i added "POISON 500" after the spelleffect and now its workin. to remove the npc itself from the forchars, i have first to store it uid and then check in the forchars, if its the one i stored. right? how to do that? for the moment i can only use FORCLIENTS to get rid of it, but the other thing would be interesting to know. RE: poison problem @Death trigger - RanXerox - 03-01-2013 01:05 PM I didn't try to test your code... so I am not sure what SRC is in the function... but assuming SRC is the creature that is dying, and you don't want SRC to take damage: Code: [FUNCTION poison_all] RE: poison problem @Death trigger - sagitariuz2 - 03-02-2013 06:20 AM works. thanks a lot! |