• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Question

Status
Not open for further replies.
Level 3
Joined
Nov 22, 2014
Messages
50
This is the idea

  • Trigger 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to [your spell]
    • Actions
      • Trigger - Turn on Trigger 2
  • Trigger 2
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current order of [your unit]) Equal to (Order([order id of spell
        • Then - Actions
          • Your actions here Then - Actions
        • Else - Actions
          • Trigger - Turn off (This trigger)
 
Level 7
Joined
Mar 6, 2014
Messages
203
I create simple example that i created but the Heal Stop Section is not MUI why??

  • Regen Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Heal
    • Actions
      • Set Index = (Index + 1)
      • Set Caster[Index] = (Triggering unit)
      • Set Life[Index] = 5.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Regen Loop <gen>
        • Else - Actions
  • Regen Loop
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • For each (Integer MaxIndex) from 1 to Index, do (Actions)
        • Loop - Actions
          • Set Life[MaxIndex] = (Life[MaxIndex] - 0.20)
          • Special Effect - Create a special effect attached to the overhead of Caster[MaxIndex] using Abilities\Spells\Items\HealingSalve\HealingSalveTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Set life of Caster[MaxIndex] to ((Life of Caster[MaxIndex]) + 20.00)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Life[MaxIndex] Less than or equal to 0.00
            • Then - Actions
              • Set Caster[MaxIndex] = Caster[Index]
              • Set Life[MaxIndex] = Life[Index]
              • Set Index = (Index - 1)
              • Set MaxIndex = (MaxIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
  • Regen Stop
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Heal
    • Actions
      • For each (Integer MaxIndex) from 1 to Index, do (Actions)
        • Loop - Actions
          • Set Life[MaxIndex] = 0.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Life[MaxIndex] Less than or equal to 0.00
            • Then - Actions
              • Set Caster[MaxIndex] = Caster[Index]
              • Set Life[MaxIndex] = Life[Index]
              • Set Index = (Index - 1)
              • Set MaxIndex = (MaxIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off Regen Loop <gen>
                • Else - Actions
            • Else - Actions

HERES THE TEST MAP.
 

Attachments

  • Test Map.w3x
    18 KB · Views: 50
Level 9
Joined
Feb 15, 2013
Messages
372
Remove the for each maxindex from 1 to index and do action

  • Regen Stop
    • Events
    • Unit - A unit Stops casting an ability
    • Conditions
    • (Ability being cast) Equal to Heal
    • Actions
    • Set Caster[MaxIndex] = Caster[Index]
    • Set Life[MaxIndex] = Life[Index]
    • Set Index = (Index - 1)
    • Set MaxIndex = (MaxIndex - 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Index Equal to 0
    • Then - Actions
    • Trigger - Turn off Regen Loop <gen>
    • Else - Actions
 
Level 7
Joined
Mar 6, 2014
Messages
203
Remove the for each maxindex from 1 to index and do action

  • Regen Stop
    • Events
    • Unit - A unit Stops casting an ability
    • Conditions
    • (Ability being cast) Equal to Heal
    • Actions
    • Set Caster[MaxIndex] = Caster[Index]
    • Set Life[MaxIndex] = Life[Index]
    • Set Index = (Index - 1)
    • Set MaxIndex = (MaxIndex - 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Index Equal to 0
    • Then - Actions
    • Trigger - Turn off Regen Loop <gen>
    • Else - Actions

Not WORKING -.-
 
Level 3
Joined
Nov 22, 2014
Messages
50
I don't get the indenting right, but this should be about it...
I pressume it's a self heal, otherwise you need another variable

  • Regen Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Heal
    • Actions
      • Set Integer1 = (Integer1 + 1)
      • Set Integer2 = (Integer2 + 1)
      • Set HealedUnit[Integer1] = (Triggering unit)
      • Set Life[Integer1] = 5.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Regen Loop <gen>
          • Trigger - Turn on Regen Stop <gen>
        • Else - Actions
  • Regen Loop
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to Integer1, do (Actions)
        • Loop - Actions
          • Set Life[Integer A] = (Life[Integer A] - 0.20)
          • Special Effect - Create a special effect attached to the overhead of HealedUnit[Integer A] using Abilities\Spells\Items\HealingSalve\HealingSalveTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Set life of HealedUnit[Integer A] to ((Life of HealedUnit[Integer A]) + 20.00)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Life[Integer A] Less than or equal to 0.00
            • Then - Actions
              • Set Integer2 = (Integer2 - 1)
              • Unit - Order HealedUnit[Integer A] to Stop
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Integer2 Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Trigger - Turn off (Regen Stop)
                  • Set Integer1 = 0
                • Else - Actions
            • Else - Actions

  • Regen Stop
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Heal
    • Actions
      • For each (Integer A) from 1 to Integer1, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
          • Triggering Unit Equal to HealedUnit([Integer A])
            • Then - Actions
              • Set Integer2 = (Integer2 - 1)
              • Set Life[Integer] = 0
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Integer2 Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Trigger - Turn off (Regen Loop)
                  • Set Integer1 = 0
              • Else - Actions
            • Else - Actions
 
Status
Not open for further replies.
Top