Help With Spellbook Trigger

imakunee

New Member
Reaction score
4
So a unit (Priestess) targets herself or an ally with an instant cast spell called Goddess's Touch. This spell is based on Holy Light. I wanted a buff to be placed on the unit so I added my buff to the spell but it wasn't placed on the units. Then I decided to use a spellbook with the buff. Below is the resulting code. It's supposed to heal double if the unit has the Goddess's Touch buff.

Problem is: The buff disappears before the actual wait timer finishes on first cast. On second cast, the buff isn't even put on. I added some game display messages to make sure it was reaching the different parts of the trigger at the right times. So far the if statement works fine. The period that the buff lasts for is approximately 5 seconds.

Help would be appreciated. ;)

Trigger:
  • Goddess Touch
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Goddess's Touch (Priestess)
    • Actions
      • Set TempUnit = (Target unit of ability being cast)
      • Game - Display to (All players) the text: Here
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) has buff Goddess's Touch (Priestess)) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: If
          • Unit - Set life of TempUnit to ((Life of TempUnit) + PRIESTESSGoddessTouchBonus[(Level of Goddess's Touch (Priestess) for (Triggering unit))])
          • Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\Orc\HealingWave\HealingWaveTarget.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
          • Game - Display to (All players) the text: Else
      • Unit - Add Buffer Goddess's Touch (Spell Book - Priestess) to TempUnit
      • Player - Disable Buffer Goddess's Touch (Spell Book - Priestess) for (Owner of TempUnit)
      • Wait 12.00 game-time seconds
      • Unit - Remove Buffer Goddess's Touch (Spell Book - Priestess) from TempUnit


When I remove the line that disables the Buffer then it works just fine (except for a slight programming error involving the buff being eliminated before the last timer goes, but that can be fixed). So maybe the Disable Spell for Player function is disabling the buff too? In which case I thought I read that disabling a spellbook retains the buffs that it has.
 

imakunee

New Member
Reaction score
4
Nevermind, I got it working. Had two spells with similar names that I had picked one of both. :mad: Gah, my super programming powers again.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top