Suggestion for spell to use

Level 9
Joined
Aug 11, 2009
Messages
508
Model/Spell Request

Edited this post to something else I needed ^^

So I am making a spell which summons a Holy Spirit over a targeted ally which lasts for 8 seconds.
Every 2 sec, the spirit heals the target of the spell.

Now, what I need is a yellow (holyish) wisp model which would work as a buff at atachment "overhead). Does only need stand and death animation.

Or, if anyone knows how to create a dummy of a wisp (with team color yellow) which can follow a unit around then that also works.

It should not be a unit put on follow as there is some delay before it moves after the unit. Must be moving with him :)

Thanks for any help on this :)
 
Last edited:
Create a Dummy Unit and make following triggers:

  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Holy Spirit
  • Actions
    • Set target = (Target unit of ability being cast)
    • Unit- Create 1 Holy Spirit for Neutral Passive at (Position of target) facing Default building facing degrees
    • Set wisp = (Last created unit)
  • Events
    • Time - Every 0.01 seconds of game time
  • Conditions
  • Actions
    • Unit - Move wisp instantly to (Position of target)
Adjust the dummy's Flying Height so it fits the targeted unit.
I suppose you will use some spell that will actually heal, but if not, I suppose you know how to trigger healing. If not even that, just say and I will post you another trigger.
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
This should help you. LocZ to get proper height for wisp (depending on position of target of the given spell)
  • init
    • Events
      • Map Initialization
    • Conditions
    • Actions
      • Set LocZ = Point(0.00,0.00)
Preparing dummy: create standart dummy using wisp model (disable attack, abilities: immunity, locust, disable shadows) and fill field Art - Allow Custom Team Color to Yellow.
  • Spell
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Spirit
    • Actions
      • Set Key = (Custom value of (Triggering unit))
      • Set HStarget[Key] = (Target unit of ability being cast)
      • Set tempp = (Position of (HStarget[Key]))
      • Unit - Create 1 dummy for (Owner of (Triggering unit)) at tempp facing Default building facing degrees
      • Unit - Add Crown Form to (Last created unit)
      • Unit - Remove Crown Form from (Last created unit)
      • Set HSdummy[Key] = (Last created unit)
      • Set Reald[Key] = 8.10
      • Set Reali[Key] = 2.00
      • Unit Group - Add (Last created unit) to Unitg
      • Trigger - Turn on Loop <gen>
      • Custom script: call RemoveLocation (udg_tempp)
  • Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Unitg and do actions
        • Loop - Actions
          • Set Key = (Custom value of (Picked unit))
          • Set Reald[Key] = Reald[Key] - 0.05
          • If (All conditions are tru) then do (Then actions) else do (Else actions)
            • If - Conditions
              • Reald[Key] Less or Equal to 0.00
            • Then - Actions
              • Unit Group - remove (Picked unit) from Unitg
              • Unit - Add 0.50 gerenic timer to (Picked unit)
            • Else - Actions
              • Custom script: set udg_rX = GetUnitX(udg_HStarget[udg_Key])
              • Custom script: set udg_rY = GetUnitY(udg_HStarget[udg_Key])
              • Custom script: call SetUnitX = (udg_HSdummy[udg_Key], udg_rX)
              • Custom script: call SetUnitY = (udg_HSdummy[udg_Key], udg_rY)
              • Custom script: call MoveLocation (udg_LocZ, udg_rX, udg_rY)
              • Custom script: set udg_Height = (GetLocationZ(udg_LocZ) + 100)
              • Animation - Change HSdummy[Key] flying height to Height over 0.00 seconds
              • Set Reali[Key] = Reali[Key] - 0.05
              • Custom script: if (Reali[Key] <= 0) then
              • <healing stuff -> you choose how it should be done>
              • Set Reali[Key] = 2.00
              • Custom script: endif
      • If (All conditions are tru) then do (Then actions) else do (Else actions)
        • If - Conditions
          • (Unitg is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
Trigger uses Unit Indexer, thanks to Bride for this amazing tool.
Fill healing actions within 'if' function.
Reald - duration of spell, Reali - interval of healing.
 
Last edited:
Level 9
Joined
Aug 11, 2009
Messages
508
Cool, thanks to both of you, I will try tomorrow and return if I cant get it to work but I'm sure there wont be any problems :)
 
Level 9
Joined
Aug 11, 2009
Messages
508
I have only one problem, I have changed so that the dummys custom colour is for player 5 yellow, but when created it is still red :/ any ideas on this?
 
Top