Skip to content

Global effects in spells

chimericchimeric Member Posts: 1,163
I tried to apply some area-wide effects via a Global effect, outside of the Spell Abilities, and none of them work. The probability is 100, so it's not that easy error. Currently I have Damage to Everyone in the Global, plus Damage to Living creature - Preset Target in the Spell Abilities. That one applies, but the Global doesn't. I know I can put an Everyone-targeted effect inside a Spell Ability... so many caps here, it's like I'm writing a fantasy novel... but I Would Like to KnoW hOw GLOBAL e f f e c t s work.

Comments

  • The user and all related content has been deleted.
  • ArdanisArdanis Member Posts: 1,736
    For spells "global effect", also known as "casting feature" in DLTCEP, executes when you start casting the spell - as opposed to effects in ability headers, that activate once the casting is finished (and after the projectile hits the target, if you use a PRO file to deliver it). One example to look at would be Fireball, which sets a variable when casting starts and nulls it after finishing.

    It should only be used for technical purpose, because e.g. if the casting is interrupted the globals will still activate, but the regular effects won't, resulting in a rather weird behavior when only half of the spell works.

    Currently I have Damage to Everyone in the Global

    You mean the global effect's target is set to "everyone (4)" but it doesn't work? That really should work.
  • chimericchimeric Member Posts: 1,163
    Yes, or anything else I put in that global. Maybe it's so technical it's just invisible? I'd like to make some use of those globals.
  • The user and all related content has been deleted.
  • chimericchimeric Member Posts: 1,163
    How am I supposed to know what is supposed to go there and what isn't? It's an area-wide effect, I want to know what it can do.
  • The user and all related content has been deleted.
  • chimericchimeric Member Posts: 1,163
    So maybe I do want to do something to the very casting of my spell. What can I do and what can't I? You aren't telling.
  • The user and all related content has been deleted.
  • ArdanisArdanis Member Posts: 1,736
    What Subtledoctor says, really.

    You do with globals what you can with normals, with the obvious exception of target type=2 (unless even that works somehow?).

    Something very simple to make Magic Missle to damage the entire location by 10 damage whenever someone casts it:
    COPY_EXISTING spwi112.spl override
      LPF ADD_SPELL_CFEFFECT INT_VAR opcode = 12 target = 4 parameter1 = 10 timing = 1 END
  • The user and all related content has been deleted.
  • chimericchimeric Member Posts: 1,163
    My question was, what can Global effects do? It's as simple as that. I don't intend to do anything with them as such, but I had, as I said, a probability 100 damage in one of those Globals, targeting Everyone, for a few points, and I sorted through a lot of other effects, and they didn't happen.
  • OlvynChuruOlvynChuru Member Posts: 3,079
    chimeric said:

    My question was, what can Global effects do? It's as simple as that. I don't intend to do anything with them as such, but I had, as I said, a probability 100 damage in one of those Globals, targeting Everyone, for a few points, and I sorted through a lot of other effects, and they didn't happen.

    Try using Self as the target. I think it'll use on the caster whatever effects you put in the global effects.
  • [Deleted User][Deleted User] Posts: 0
    edited September 2016
    The user and all related content has been deleted.
  • chimericchimeric Member Posts: 1,163
    When I put something on your plate and you ask me what it is, I'm going to answer about the function of plates.
  • GrimLefourbeGrimLefourbe Member Posts: 637
    edited September 2016
    As I understand, they can do everything other spell effects can do.

    I haven't got a lot of experience but from what i've seen they are for example used for one time use innates when a global effect that removes the innate ability is added to the spell.

    Another example, the pocket plane spell has an effect that removes it from memory followed by another that adds it back. This way, even if the casting of the spell is interrupted charname still has access to the spell.

    Any more experienced modder, feel free to correct me.
  • [Deleted User][Deleted User] Posts: 0
    edited September 2016
    The user and all related content has been deleted.
  • chimericchimeric Member Posts: 1,163
    It answers it all right. I can just think of a number of other uses for Globals.
  • The user and all related content has been deleted.
  • chimericchimeric Member Posts: 1,163
    I had something yesterday. I will again when I need to.
  • GrimLefourbeGrimLefourbe Member Posts: 637
    I think it can be used to make casting graphics sort of like irenicus in cutscenes, will look weird if you're interrupted though.
  • chimericchimeric Member Posts: 1,163
    Those visuals are regular BAM and VVC files, just not used in the standard spells.
Sign In or Register to comment.