• 🏆 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!

[Trigger] MUI dont work! Help!

Status
Not open for further replies.
Level 11
Joined
Jan 25, 2009
Messages
572
Hello. I've trying to create a spell that's called Feared Slice and have just tried to learn Indexing. I did understand 80% of the tutorial but when i do almost as the tutorial says in my spell the MUI doesn't work anyway. Please help me.

Here's the triggers :mwahaha:

  • Feared Slice init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Feared Slice
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FS_Index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Feared Slice Loop <gen>
        • Else - Actions
      • Set FS_Index[1] = (FS_Index[1] + 1)
      • Set FS_Index[2] = (FS_Index[2] + 1)
      • Set FS_LoopIsOn[FS_Index[2]] = True
      • Set FS_TargetedUnit[FS_Index[2]] = (Target unit of ability being cast)
      • Set FS_CastingUnit[FS_Index[2]] = (Casting unit)
      • Set FS_Hits[FS_Index[2]] = (4 + (1 x (Level of Feared Slice for FS_CastingUnit[FS_Index[2]])))
  • Feared Slice Loop
    • Events
      • Time - Every 1.40 seconds of game time
    • Conditions
    • Actions
      • For each (Integer FS_Index[3]) from 1 to FS_Index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FS_LoopIsOn[FS_Index[3]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (FS_TargetedUnit[FS_Index[3]] is alive) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FS_MoveInteger[FS_Index[3]] Equal to 0
                    • Then - Actions
                      • Set FS_MoveInteger[FS_Index[3]] = 1
                      • Set FS_Point1 = (Position of FS_CastingUnit[FS_Index[2]])
                      • Set FS_Point2 = (Position of FS_TargetedUnit[FS_Index[2]])
                      • Unit - Pause FS_TargetedUnit[FS_Index[3]]
                      • Unit - Make FS_CastingUnit[FS_Index[3]] Invulnerable
                      • Unit - Add Feared Slice Crit to FS_CastingUnit[FS_Index[3]]
                      • Unit - Move FS_CastingUnit[FS_Index[3]] instantly to FS_Point2
                      • Unit - Order FS_CastingUnit[FS_Index[3]] to Attack FS_TargetedUnit[FS_Index[3]]
                      • Custom script: call RemoveLocation (udg_FS_Point2)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FS_Duration[FS_Index[3]] Equal to FS_Hits[FS_Index[3]]
                    • Then - Actions
                      • Set FS_Index[1] = (FS_Index[1] - 1)
                      • Set FS_LoopIsOn[FS_Index[3]] = False
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • FS_Index[1] Equal to 0
                        • Then - Actions
                          • Set FS_Index[2] = 0
                          • Set FS_Duration[FS_Index[3]] = 0
                          • Unit - Remove Feared Slice Crit from FS_CastingUnit[FS_Index[3]]
                          • Unit - Unpause FS_TargetedUnit[FS_Index[3]]
                          • Unit - Make FS_CastingUnit[FS_Index[3]] Vulnerable
                          • Unit - Move FS_CastingUnit[FS_Index[3]] instantly to FS_Point1
                          • Custom script: call RemoveLocation (udg_FS_Point1)
                          • Selection - Select FS_CastingUnit[FS_Index[3]] for (Owner of FS_CastingUnit[FS_Index[3]])
                          • Set FS_MoveInteger[FS_Index[3]] = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                    • Else - Actions
                      • Set FS_Duration[FS_Index[3]] = (FS_Duration[FS_Index[3]] + 1)
                      • Selection - Remove FS_CastingUnit[FS_Index[3]] from selection for (Owner of FS_CastingUnit[FS_Index[3]])
                • Else - Actions
            • Else - Actions
 
Level 11
Joined
Jan 25, 2009
Messages
572
yes also the actions when checking if index 1 is 0 have all actions which should be above it, if multiple spells are one at the same time, no one will be removed same goes with the point, you leak it if you cast it more than once

Well now i've put the actions above the check if index is 0. The only thing that don't work now is that one of the units get teleportated back to where he stood(As he should be) but the other stays at the same location.
 
Level 19
Joined
Aug 16, 2007
Messages
881
Hello. I've trying to create a spell that's called Feared Slice and have just tried to learn Indexing. I did understand 80% of the tutorial but when i do almost as the tutorial says in my spell the MUI doesn't work anyway. Please help me.

Here's the triggers :mwahaha:

  • Feared Slice init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Feared Slice
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FS_Index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Feared Slice Loop <gen>
        • Else - Actions
      • Set FS_Index[1] = (FS_Index[1] + 1)
      • Set FS_Index[2] = (FS_Index[2] + 1)
      • Set FS_LoopIsOn[FS_Index[2]] = True
      • Set FS_TargetedUnit[FS_Index[2]] = (Target unit of ability being cast)
      • Set FS_CastingUnit[FS_Index[2]] = (Casting unit)
      • Set FS_Hits[FS_Index[2]] = (4 + (1 x (Level of Feared Slice for FS_CastingUnit[FS_Index[2]])))
  • Feared Slice Loop
    • Events
      • Time - Every 1.40 seconds of game time
    • Conditions
    • Actions
      • For each (Integer FS_Index[3]) from 1 to FS_Index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FS_LoopIsOn[FS_Index[3]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (FS_TargetedUnit[FS_Index[3]] is alive) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FS_MoveInteger[FS_Index[3]] Equal to 0
                    • Then - Actions
                      • Set FS_MoveInteger[FS_Index[3]] = 1
                      • Set FS_Point1 = (Position of FS_CastingUnit[FS_Index[2]])
                      • Set FS_Point2 = (Position of FS_TargetedUnit[FS_Index[2]])
                      • Unit - Pause FS_TargetedUnit[FS_Index[3]]
                      • Unit - Make FS_CastingUnit[FS_Index[3]] Invulnerable
                      • Unit - Add Feared Slice Crit to FS_CastingUnit[FS_Index[3]]
                      • Unit - Move FS_CastingUnit[FS_Index[3]] instantly to FS_Point2
                      • Unit - Order FS_CastingUnit[FS_Index[3]] to Attack FS_TargetedUnit[FS_Index[3]]
                      • Custom script: call RemoveLocation (udg_FS_Point2)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FS_Duration[FS_Index[3]] Equal to FS_Hits[FS_Index[3]]
                    • Then - Actions
                      • Set FS_Index[1] = (FS_Index[1] - 1)
                      • Set FS_LoopIsOn[FS_Index[3]] = False
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • FS_Index[1] Equal to 0
                        • Then - Actions
                          • Set FS_Index[2] = 0
                          • Set FS_Duration[FS_Index[3]] = 0
                          • Unit - Remove Feared Slice Crit from FS_CastingUnit[FS_Index[3]]
                          • Unit - Unpause FS_TargetedUnit[FS_Index[3]]
                          • Unit - Make FS_CastingUnit[FS_Index[3]] Vulnerable
                          • Unit - Move FS_CastingUnit[FS_Index[3]] instantly to FS_Point1
                          • Custom script: call RemoveLocation (udg_FS_Point1)
                          • Selection - Select FS_CastingUnit[FS_Index[3]] for (Owner of FS_CastingUnit[FS_Index[3]])
                          • Set FS_MoveInteger[FS_Index[3]] = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                    • Else - Actions
                      • Set FS_Duration[FS_Index[3]] = (FS_Duration[FS_Index[3]] + 1)
                      • Selection - Remove FS_CastingUnit[FS_Index[3]] from selection for (Owner of FS_CastingUnit[FS_Index[3]])
                • Else - Actions
            • Else - Actions


Well, I'll try help you. In order to make this MUI you'll have to do the following:
  • Set FS_Point1 = (Position of FS_CastingUnit[FS_Index[2]])
  • Set FS_Point2 = (Position of FS_TargetedUnit[FS_Index[2]])
Set this to:
  • Set FS_Point1 = (Position of FS_CastingUnit[FS_Index[3]])
  • Set FS_Point2 = (Position of FS_TargetedUnit[FS_Index[3]])
Also:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (FS_TargetedUnit[FS_Index[3]] is alive) Equal to True
What is the unit dies? What will happen then? Yes, nothing. Place this condition below the
  • FS_Duration[FS_Index[3]] Equal to FS_Hits[FS_Index[3]]
condition and place them between an or-condition. But before you continue, you'll have to set True to False

Next is this:
  • Set FS_Duration[FS_Index[3]] = 0
  • Unit - Remove Feared Slice Crit from FS_CastingUnit[FS_Index[3]]
  • Unit - Unpause FS_TargetedUnit[FS_Index[3]]
  • Unit - Make FS_CastingUnit[FS_Index[3]] Vulnerable
  • Unit - Move FS_CastingUnit[FS_Index[3]] instantly to FS_Point1
  • Custom script: call RemoveLocation (udg_FS_Point1)
  • Selection - Select FS_CastingUnit[FS_Index[3]] for (Owner of FS_CastingUnit[FS_Index[3]])
  • Set FS_MoveInteger[FS_Index[3]] = 0
This will only affect one indexed unit. Because, ONLY when you only have one active unit left this will run. That's why you should put those actions above this:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • FS_Index[1] Equal to 0
  • Then - Actions
  • Else - Actions
I hope this helps, I couldn't read your code that good, because it's very unsorted... Well, try this and tell me if it won't work.
 
Level 11
Joined
Jan 25, 2009
Messages
572
Well, I'll try help you. In order to make this MUI you'll have to do the following:
  • Set FS_Point1 = (Position of FS_CastingUnit[FS_Index[2]])
  • Set FS_Point2 = (Position of FS_TargetedUnit[FS_Index[2]])
Set this to:
  • Set FS_Point1 = (Position of FS_CastingUnit[FS_Index[3]])
  • Set FS_Point2 = (Position of FS_TargetedUnit[FS_Index[3]])
Also:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (FS_TargetedUnit[FS_Index[3]] is alive) Equal to True
What is the unit dies? What will happen then? Yes, nothing. Place this condition below the
  • FS_Duration[FS_Index[3]] Equal to FS_Hits[FS_Index[3]]
condition and place them between an or-condition. But before you continue, you'll have to set True to False

Next is this:
  • Set FS_Duration[FS_Index[3]] = 0
  • Unit - Remove Feared Slice Crit from FS_CastingUnit[FS_Index[3]]
  • Unit - Unpause FS_TargetedUnit[FS_Index[3]]
  • Unit - Make FS_CastingUnit[FS_Index[3]] Vulnerable
  • Unit - Move FS_CastingUnit[FS_Index[3]] instantly to FS_Point1
  • Custom script: call RemoveLocation (udg_FS_Point1)
  • Selection - Select FS_CastingUnit[FS_Index[3]] for (Owner of FS_CastingUnit[FS_Index[3]])
  • Set FS_MoveInteger[FS_Index[3]] = 0
This will only affect one indexed unit. Because, ONLY when you only have one active unit left this will run. That's why you should put those actions above this:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • FS_Index[1] Equal to 0
  • Then - Actions
  • Else - Actions
I hope this helps, I couldn't read your code that good, because it's very unsorted... Well, try this and tell me if it won't work.

Well. I think i have understand a bit of what u mean but now i've this but it's not working:

  • Feared Slice init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Feared Slice
    • Actions
      • Set FS_Index[2] = (FS_Index[2] + 1)
      • Set FS_LoopIsOn[FS_Index[2]] = True
      • Set FS_CastingUnit[FS_Index[2]] = (Casting unit)
      • Set FS_TargetedUnit[FS_Index[2]] = (Target unit of ability being cast)
      • Set FS_Hits[FS_Index[2]] = (4 + (1 x (Level of Feared Slice for FS_CastingUnit[FS_Index[2]])))
      • Set FS_Point1 = (Position of FS_CastingUnit[FS_Index[3]])
      • Set FS_Point2 = (Position of FS_TargetedUnit[FS_Index[2]])
      • Unit - Pause FS_TargetedUnit[FS_Index[2]]
      • Unit - Make FS_CastingUnit[FS_Index[2]] Invulnerable
      • Unit - Add Feared Slice Crit to FS_CastingUnit[FS_Index[2]]
      • Unit - Move FS_CastingUnit[FS_Index[2]] instantly to FS_Point2
      • Unit - Order FS_CastingUnit[FS_Index[2]] to Attack FS_TargetedUnit[FS_Index[2]]
      • Custom script: call RemoveLocation (udg_FS_Point2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FS_Index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Feared Slice Loop <gen>
        • Else - Actions
      • Set FS_Index[1] = (FS_Index[1] + 1)
  • Feared Slice Loop
    • Events
      • Time - Every 1.40 seconds of game time
    • Conditions
    • Actions
      • For each (Integer FS_Index[3]) from 1 to FS_Index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FS_LoopIsOn[FS_Index[3]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (FS_TargetedUnit[FS_Index[3]] is alive) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FS_Duration[FS_Index[3]] Not equal to FS_Hits[FS_Index[3]]
                    • Then - Actions
                      • Set FS_Duration[FS_Index[3]] = (FS_Duration[FS_Index[3]] + 1)
                      • Selection - Remove FS_CastingUnit[FS_Index[3]] from selection for (Owner of FS_CastingUnit[FS_Index[3]])
                    • Else - Actions
                      • Set FS_Index[1] = (FS_Index[1] - 1)
                      • Set FS_LoopIsOn[FS_Index[3]] = False
                      • Unit - Unpause FS_TargetedUnit[FS_Index[3]]
                      • Set FS_Duration[FS_Index[3]] = 0
                      • Unit - Remove Feared Slice Crit from FS_CastingUnit[FS_Index[3]]
                      • Unit - Make FS_CastingUnit[FS_Index[3]] Vulnerable
                      • Unit - Move FS_CastingUnit[FS_Index[3]] instantly to FS_Point1
                      • Selection - Select FS_CastingUnit[FS_Index[3]] for (Owner of FS_CastingUnit[FS_Index[3]])
                      • Custom script: call RemoveLocation (udg_FS_Point1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • FS_Index[1] Equal to 0
                        • Then - Actions
                          • Set FS_Index[2] = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                • Else - Actions
            • Else - Actions
Can u help?
 
Level 19
Joined
Aug 16, 2007
Messages
881
Well. I think i have understand a bit of what u mean but now i've this but it's not working:

  • Feared Slice init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Feared Slice
    • Actions
      • Set FS_Index[2] = (FS_Index[2] + 1)
      • Set FS_LoopIsOn[FS_Index[2]] = True
      • Set FS_CastingUnit[FS_Index[2]] = (Casting unit)
      • Set FS_TargetedUnit[FS_Index[2]] = (Target unit of ability being cast)
      • Set FS_Hits[FS_Index[2]] = (4 + (1 x (Level of Feared Slice for FS_CastingUnit[FS_Index[2]])))
      • Set FS_Point1 = (Position of FS_CastingUnit[FS_Index[3]])
      • Set FS_Point2 = (Position of FS_TargetedUnit[FS_Index[2]])
      • Unit - Pause FS_TargetedUnit[FS_Index[2]]
      • Unit - Make FS_CastingUnit[FS_Index[2]] Invulnerable
      • Unit - Add Feared Slice Crit to FS_CastingUnit[FS_Index[2]]
      • Unit - Move FS_CastingUnit[FS_Index[2]] instantly to FS_Point2
      • Unit - Order FS_CastingUnit[FS_Index[2]] to Attack FS_TargetedUnit[FS_Index[2]]
      • Custom script: call RemoveLocation (udg_FS_Point2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FS_Index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Feared Slice Loop <gen>
        • Else - Actions
      • Set FS_Index[1] = (FS_Index[1] + 1)
  • Feared Slice Loop
    • Events
      • Time - Every 1.40 seconds of game time
    • Conditions
    • Actions
      • For each (Integer FS_Index[3]) from 1 to FS_Index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FS_LoopIsOn[FS_Index[3]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (FS_TargetedUnit[FS_Index[3]] is alive) Equal to True
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FS_Duration[FS_Index[3]] Not equal to FS_Hits[FS_Index[3]]
                    • Then - Actions
                      • Set FS_Duration[FS_Index[3]] = (FS_Duration[FS_Index[3]] + 1)
                      • Selection - Remove FS_CastingUnit[FS_Index[3]] from selection for (Owner of FS_CastingUnit[FS_Index[3]])
                    • Else - Actions
                      • Set FS_Index[1] = (FS_Index[1] - 1)
                      • Set FS_LoopIsOn[FS_Index[3]] = False
                      • Unit - Unpause FS_TargetedUnit[FS_Index[3]]
                      • Set FS_Duration[FS_Index[3]] = 0
                      • Unit - Remove Feared Slice Crit from FS_CastingUnit[FS_Index[3]]
                      • Unit - Make FS_CastingUnit[FS_Index[3]] Vulnerable
                      • Unit - Move FS_CastingUnit[FS_Index[3]] instantly to FS_Point1
                      • Selection - Select FS_CastingUnit[FS_Index[3]] for (Owner of FS_CastingUnit[FS_Index[3]])
                      • Custom script: call RemoveLocation (udg_FS_Point1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • FS_Index[1] Equal to 0
                        • Then - Actions
                          • Set FS_Index[2] = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                • Else - Actions
            • Else - Actions
Can u help?

Well, you almost got it right I think. If I understand the spell correct, the point it that you select a target unit and the caster will get teleported to the targeted unit and start attacking it, right? And you'll add a critical strike to the casting unit. After a couple of hits the effect will end. Well... Now to the triggering. It looks kinda okey, but I have some things to tel you.

First you've put the wrong number in this action:
  • Set FS_Point1 = (Position of FS_CastingUnit[FS_Index[3]])
it should be
  • Set FS_Point1 = (Position of FS_CastingUnit[FS_Index[2]])
And in the first trigger you should move this "if/then/else":
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • FS_Index[1] Equal to 0
    • Then - Actions
      • Trigger - Turn on Feared Slice Loop <gen>
    • Else - Actions
at the start of the trigger like this:

  • Feared Slice init
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Feared Slice
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • FS_Index[1] Equal to 0
      • Then - Actions
        • Trigger - Turn on Feared Slice Loop <gen>
      • Else - Actions
It's a little more easier to read it then, well, for me. And put this line
  • Set FS_Index[1] = (FS_Index[1] + 1)
above
  • Set FS_Index[2] = (FS_Index[2] + 1)
when you're done the first actions should look like this:

  • Feared Slice init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Feared Slice
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FS_Index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Feared Slice Loop <gen>
        • Else - Actions
  • Set FS_Index[1] = (FS_Index[1] + 1)
  • Set FS_Index[2] = (FS_Index[2] + 1)


Now to the last trigger "Feared Slice Loop".

Now I did see something that won't make your spell MUI. I saw that this variable: "FS_Point1" were used in the second trigger also. The problem with this variable is that it will be overwrited the next time this spell is used. You'll have to make this variable an array. And then initialize it in the first trigger like:
  • Set FS_Point1[FS_Index[2]] = (Position of FS_CastingUnit[FS_Index[3]])
After that you'll have to change this action
  • Unit - Move FS_CastingUnit[FS_Index[3]] instantly to FS_Point1
in your second trigger to
  • Unit - Move FS_CastingUnit[FS_Index[3]] instantly to FS_Point1[FS_Index[3]]
. And after that change this
  • Custom script: call RemoveLocation (udg_FS_Point1)
to
  • Custom script: call RemoveLocation (udg_FS_Point1[FS_Index[3]])
:)

After all this I can only see one more problem. It's this condition:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (FS_TargetedUnit[FS_Index[3]] is alive) Equal to True
    • Then - Actions
You should move this condition to:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • FS_Duration[FS_Index[3]] Not equal to FS_Hits[FS_Index[3]]
      • (FS_TargetedUnit[FS_Index[3]] is alive) Equal to True
    • Then - Actions
but set true to false

Try this out and tell me if it isn't working.
 
Level 11
Joined
Jan 25, 2009
Messages
572
Well, you almost got it right I think. If I understand the spell correct, the point it that you select a target unit and the caster will get teleported to the targeted unit and start attacking it, right? And you'll add a critical strike to the casting unit. After a couple of hits the effect will end. Well... Now to the triggering. It looks kinda okey, but I have some things to tel you.

First you've put the wrong number in this action:
  • Set FS_Point1 = (Position of FS_CastingUnit[FS_Index[3]])
it should be
  • Set FS_Point1 = (Position of FS_CastingUnit[FS_Index[2]])
And in the first trigger you should move this "if/then/else":
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • FS_Index[1] Equal to 0
    • Then - Actions
      • Trigger - Turn on Feared Slice Loop <gen>
    • Else - Actions
at the start of the trigger like this:

  • Feared Slice init
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Feared Slice
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • FS_Index[1] Equal to 0
      • Then - Actions
        • Trigger - Turn on Feared Slice Loop <gen>
      • Else - Actions
It's a little more easier to read it then, well, for me. And put this line
  • Set FS_Index[1] = (FS_Index[1] + 1)
above
  • Set FS_Index[2] = (FS_Index[2] + 1)
when you're done the first actions should look like this:

  • Feared Slice init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Feared Slice
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FS_Index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Feared Slice Loop <gen>
        • Else - Actions
  • Set FS_Index[1] = (FS_Index[1] + 1)
  • Set FS_Index[2] = (FS_Index[2] + 1)


Now to the last trigger "Feared Slice Loop".

Now I did see something that won't make your spell MUI. I saw that this variable: "FS_Point1" were used in the second trigger also. The problem with this variable is that it will be overwrited the next time this spell is used. You'll have to make this variable an array. And then initialize it in the first trigger like:
  • Set FS_Point1[FS_Index[2]] = (Position of FS_CastingUnit[FS_Index[3]])
After that you'll have to change this action
  • Unit - Move FS_CastingUnit[FS_Index[3]] instantly to FS_Point1
in your second trigger to
  • Unit - Move FS_CastingUnit[FS_Index[3]] instantly to FS_Point1[FS_Index[3]]
. And after that change this
  • Custom script: call RemoveLocation (udg_FS_Point1)
to
  • Custom script: call RemoveLocation (udg_FS_Point1[FS_Index[3]])
:)

After all this I can only see one more problem. It's this condition:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (FS_TargetedUnit[FS_Index[3]] is alive) Equal to True
    • Then - Actions
You should move this condition to:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • FS_Duration[FS_Index[3]] Not equal to FS_Hits[FS_Index[3]]
      • (FS_TargetedUnit[FS_Index[3]] is alive) Equal to True
    • Then - Actions
but set true to false

Try this out and tell me if it isn't working.

Well Flood.. Now i've changed all to try out Hashtables cuz like 7/10 said that hashtables was easier than indexing. But i cant understand hash either.... Im stuck!
 
Status
Not open for further replies.
Top