Guest Spellcaster Posted August 16, 2020 Posted August 16, 2020 Hi, It appears that the SpellCastOnMe trigger only resolves to True when the spell cast is single target. Or more accurately, it doesn't resolve to True when the spell is a regular area of effect. (Dunno if there are edge cases) See this comment tree for details. Just saying in case you want to update the website Cheers Quote
kjeron Posted August 18, 2020 Posted August 18, 2020 It still triggers when Area-Effect spells are actually cast on a creature (and not a point/location), such as through scripts and opcodes. The trigger is quite literal - the spell must be cast targeting the creature, not just affect the creature. Quote
Jarno Mikkola Posted August 18, 2020 Posted August 18, 2020 But you could make the area-effects use a cast onself effects and it wouldn't be a problem. Fireball... ok, so I burn myself a bit... of course that might interrupt some scripts, ahh but who cares. Quote
lynx Posted August 30, 2020 Posted August 30, 2020 Just a note to modders, I tested with the gate lich and unexpectedly, SpellCastOnMe([ANYONE],WIZARD_TRUE_SIGHT) doesn't match, not even on the first invocation. I haven't tested with the subspell, but perhaps that would work. Potentially something to address with the fixpack. Quote
Luke Posted August 30, 2020 Posted August 30, 2020 On 8/18/2020 at 8:57 PM, kjeron said: It still triggers when Area-Effect spells are actually cast on a creature (and not a point/location), such as through scripts and opcodes. The trigger is quite literal - the spell must be cast targeting the creature, not just affect the creature. It's not working for me, even when I directly click on a specific sprite. Spoiler IF OR(2) SpellCastOnMe(Protagonist,WIZARD_TRUE_DISPEL_MAGIC) // SPWI326.SPL (Dispel Magic) SpellCastOnMeRES("SPPR950",Protagonist) // True Sight THEN RESPONSE #100 DisplayStringHead(Myself,1080) // Druid END What am I missing? In any case, this trigger should probably fire even when the spell just affects the creature @Galactygon Quote
kjeron Posted August 30, 2020 Posted August 30, 2020 (edited) 2 hours ago, Luke said: It's not working for me, even when I directly click on a specific sprite. A location/point-targeted spell (ability target 4) cannot be cast on a creature through the UI* - even if you click on the sprite, it's still targeting their location, not the creature. * They can target a creature while in a contingency or sequencer, though the sequencer must also contain a creature-targeted spell. Edited August 30, 2020 by kjeron Quote
Luke Posted October 14, 2020 Posted October 14, 2020 (edited) On 8/30/2020 at 7:14 PM, kjeron said: A location/point-targeted spell (ability target 4) cannot be cast on a creature through the UI* - even if you click on the sprite, it's still targeting their location, not the creature. Oh, that means Nishruus and Hakeashars have always been (partially) broken? That's kinda bad... In the current v2.6 beta "SpellCastOnMe()" keeps ignoring Ability Target 4, so that script trigger is probably intended to work that way... Any idea how to fix them? First of all, spell description doesn't state that Remove Magic and the like are supposed to kill them (only Death Spell), so I'm not sure why they're scripted to die if hit by those spells... As far as IF SpellCastOnMe([ANYONE],0) THEN RESPONSE #100 ApplySpell(Myself,CLERIC_CURE_LIGHT_WOUNDS) // SPPR103.SPL (Cure Light Wounds) END is concerned, you could remove that block from their script and patch all SPWI and SPPR spells (including those that target "Living actor") with a leading 326 effect (power = 0, resist_dispel = 0, savetype = 0, resource = "SPPR103") followed by a 318 effect to prevent further effects from affecting these creatures. The condition for the 326/318 effects could be "SPECIFIC = specified value" or "SPLSTATE = specified value", since "RACE = MIST" or "CLASS = MIST" sounds too generic... What do you think? Edited October 14, 2020 by Luke Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.