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

damage every second for 10 seconds. – There's gotta be a better way to do this...

Status
Not open for further replies.
Level 12
Joined
May 20, 2009
Messages
822
Basically, I want this AoE spell to do damage every second for 10 seconds. But this is the best I can think of:

  • Ripfield Level 1
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Ranger
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
          • (Ability being cast) Equal to Ripfield
    • Actions
      • Set RipfieldAoE = (Region((Target point of ability being cast), (Target point of ability being cast)))
      • Set RipFieldCasterP1 = (Casting unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Level of Ripfield for (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit - Cause RipFieldCasterP1 to damage circular area after 0.00 seconds of radius 300.00 at (Center of RipfieldAoE), dealing 8.00 damage of attack type Spells and damage type Magic
          • Wait 1.00 game-time seconds
          • Unit - Cause RipFieldCasterP1 to damage circular area after 0.00 seconds of radius 300.00 at (Center of RipfieldAoE), dealing 8.00 damage of attack type Spells and damage type Magic
          • Wait 1.00 game-time seconds
          • Unit - Cause RipFieldCasterP1 to damage circular area after 0.00 seconds of radius 300.00 at (Center of RipfieldAoE), dealing 8.00 damage of attack type Spells and damage type Magic
          • Wait 1.00 game-time seconds
          • Unit - Cause RipFieldCasterP1 to damage circular area after 0.00 seconds of radius 300.00 at (Center of RipfieldAoE), dealing 8.00 damage of attack type Spells and damage type Magic
          • Wait 1.00 game-time seconds
          • Unit - Cause RipFieldCasterP1 to damage circular area after 0.00 seconds of radius 300.00 at (Center of RipfieldAoE), dealing 8.00 damage of attack type Spells and damage type Magic
          • Wait 1.00 game-time seconds
          • Unit - Cause RipFieldCasterP1 to damage circular area after 0.00 seconds of radius 300.00 at (Center of RipfieldAoE), dealing 8.00 damage of attack type Spells and damage type Magic
          • Wait 1.00 game-time seconds
          • Unit - Cause RipFieldCasterP1 to damage circular area after 0.00 seconds of radius 300.00 at (Center of RipfieldAoE), dealing 8.00 damage of attack type Spells and damage type Magic
          • Wait 1.00 game-time seconds
          • Unit - Cause RipFieldCasterP1 to damage circular area after 0.00 seconds of radius 300.00 at (Center of RipfieldAoE), dealing 8.00 damage of attack type Spells and damage type Magic
          • Wait 1.00 game-time seconds
          • Unit - Cause RipFieldCasterP1 to damage circular area after 0.00 seconds of radius 300.00 at (Center of RipfieldAoE), dealing 8.00 damage of attack type Spells and damage type Magic
          • Wait 1.00 game-time seconds
          • Unit - Cause RipFieldCasterP1 to damage circular area after 0.00 seconds of radius 300.00 at (Center of RipfieldAoE), dealing 8.00 damage of attack type Spells and damage type Magic
          • Wait 1.00 game-time seconds
          • Unit - Cause RipFieldCasterP1 to damage circular area after 0.00 seconds of radius 300.00 at (Center of RipfieldAoE), dealing 8.00 damage of attack type Spells and damage type Magic
          • Custom script: call RemoveRect(udg_RipfieldAoE)
        • Else - Actions
There HAS to be a better way to do this. I'm using Death & Decay as a base spell...
 
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,543
You need to use some form of indexing and make this spell MUI. Also you leak locations.

Take a look at my tutorial things you should know when using triggers / gui. The chapter on how to index will show you how to make spells MUI.

Also never use And All conditions unless it is inside an or all condition block.
Read this to understand why you do not need and all conditions.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
 
Level 12
Joined
May 20, 2009
Messages
822
You need to use some form of indexing and make this spell MUI. Also you leak locations.

Take a look at my tutorial things you should know when using triggers / gui. The chapter on how to index will show you how to make spells MUI.

Also never use And All conditions unless it is inside an or all condition block.
Read this to understand why you do not need and all conditions.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)

That And Condition in my If/Than/Else was a left over from when I had more conditions in there but realized I didn't need them.

I need to know how I can do this AoE without having to do this Damage->Wait->Damage->Wait->Etc....

EDIT: I looked at the "Indexing" part of your thing and I don't quite understand it. It's really messy and hard to follow. Can you explain it a bit more simply?
EDIT2: Also, it's not as necessary that this is MUI compatible as it is only on ONE unit and is only used by that one unit, per player. I only NEED to make it compatible for each player, which would be easy by making a variable for the Caster and the AoE per player. But - If you know how I can make it MUI Compatible, then let me know.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
It really is not messy. It is all explained in the tutorial. You will not understand it at a quick glance.

First you need 2 triggers. When to activate when you cast the spell. Another with event Every 0.03 seconds.

In first trigger you first increase a max Index integer. (This tells you how many spell instances are running). Then add every bit of info you need into an array. Then you check to see if maxIndex == 1. If it is you start the loop trigger. (2nd trigger)

In second trigger you use a real integer to count up to one second then you do the actions. After the spell has finished you de index and check if the spell instances == 0. If it is 0 you turn of the loop trigger.
 
Level 12
Joined
May 20, 2009
Messages
822
I'm sorry, but. It's still pretty confusing. Am I on the right track with this?

  • Ripfield Test 1
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Ripfield
    • Actions
      • Set RipFieldMaxIndex = (RipFieldMaxIndex + 1)
      • Set RipFieldCasterIndex[RipFieldMaxIndex] = (Casting unit)
  • Ripfield Test 1 pt2
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer RipfieldTempInit) from 1 to RipFieldMaxIndex, do (Actions)
        • Loop - Actions
          • Unit - Cause RipFieldCasterIndex[RipfieldTempInit] to damage circular area after 1.00 seconds of radius 300.00 at (Target point of ability being cast), dealing 12.00 damage of attack type Spells and damage type Normal
EDIT: This is just a wip, ignore everthing after the "Unit - Cause RipFieldCasterIndex[RipfieldTempInit] "
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Do you want aoe damage around caster's position or spell target position?

Edit: ok I see spell target position

Yeah as deathismyfriend said some kind of Unit Indexer will make your work easier.Even the simplest indexer which only assigns unique custom value to all
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Yeah as deathismyfriend said some kind of Unit Indexer will make your work easier.Even the simplest indexer which only assigns unique custom value to all

I never said unit indexer.

I said indexed array.

@TO
Change timer to every 0.03 seconds.
You need 2 integer arrays also.
One of them is for counting time. Call it TimeCounter
One is for counting number of times damaged. Call it DamageTimes
And you need to store the location since you use target point. Call it TargetLocation

  • Ripfield Test 1
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Ripfield
    • Actions
      • Set RipFieldMaxIndex = (RipFieldMaxIndex + 1)
      • Set RipFieldCasterIndex[RipFieldMaxIndex] = (Casting unit)
      • Set TimeCounter[RipFieldMaxIndex] = 0
      • Set DamageTimes[RipFieldMaxIndex] = 0
      • Set TargetLocation[RipFieldMaxIndex] = (Target point of ability being cast)
      • If all conditions are true
        • If - conditions
          • RipFieldMaxIndex equals 1
        • Then - Conditions
          • Turn on - Ripfield Test 1 pt2
        • Else - Conditions
  • Ripfield Test 1 pt2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer tempInit) from 1 to RipFieldMaxIndex, do (Actions)
        • Loop - Actions
          • Set TimeCounter[tempInit] = (TimeCounter[tempInit] + 1)
          • if all conditions are true do actions
            • If - Conditions
              • TimeCounter[tempInit] equals 33
            • Then- Actions
              • Set TimeCounter[tempInit] = 0
              • Set DamageTimes[tempInit] = (DamageTimes[tempInit] + 1)
              • Unit - Cause RipFieldCasterIndex[tempInit] to damage circular area after 1.00 seconds of radius 300.00 at TargetLocation[tempInit], dealing 12.00 damage of attack type Spells and damage type Normal
              • if all conditions are true do actions
                • If - Conditions
                  • DamageTimes equal 10
                • Then- Actions
                  • Set RipFieldCasterIndex[tempInit] = RipFieldCasterIndex[RipFieldMaxIndex]
                  • Set RipFieldCasterIndex[RipFieldMaxIndex] = (Casting unit)
                  • Set TimeCounter[tempInit] = TimeCounter[RipFieldMaxIndex]
                  • Set TimeCounter[RipFieldMaxIndex] = 0
                  • Set DamageTimes[tempInit] = DamageTimes[RipFieldMaxIndex]
                  • Set DamageTimes[RipFieldMaxIndex] = 0
                  • Custom script: call RemoveLocation( udg_TargetLocation[tempInit])
                  • Set TargetLocation[tempInit] = TargetLocation[RipFieldMaxIndex]
                  • Set RipFieldMaxIndex = (RipFieldMaxIndex - 1)
                  • Set tempInit= (tempInit- 1)
                • Else - Actions
            • Else - Actions
 
Level 12
Joined
May 20, 2009
Messages
822
I have one question, what is the TempInit? Is that a normal variable, or something else? How do I use it?

EDIT:

Okay, so, I think I copied these exactly correctly but it does not do anything.

  • Ripfield Test 1
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Ripfield
    • Actions
      • Set RipFieldMaxIndex = (RipFieldMaxIndex + 1)
      • Set RipFieldCasterIndex[RipFieldMaxIndex] = (Casting unit)
      • Set RipFieldTimeCounter[RipFieldMaxIndex] = 0
      • Set RipFieldDamageTimes[RipFieldMaxIndex] = 0
      • Set RipfieldAoE[RipFieldMaxIndex] = (Target point of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RipFieldMaxIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on Ripfield Test 1 pt2 <gen>
        • Else - Actions
  • Ripfield Test 1 pt2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer RipfieldTempInit) from 1 to RipFieldMaxIndex, do (Actions)
        • Loop - Actions
          • Set RipFieldTimeCounter[RipfieldTempInit] = RipFieldTimeCounter[(RipfieldTempInit + 1)]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RipFieldTimeCounter[RipfieldTempInit] Equal to 33
            • Then - Actions
              • Set RipFieldTimeCounter[RipfieldTempInit] = 0
              • Set RipFieldDamageTimes[RipfieldTempInit] = RipFieldDamageTimes[(RipFieldDamageTimes[RipfieldTempInit] + 1)]
              • Unit - Cause RipFieldCasterIndex[RipfieldTempInit] to damage circular area after 1.00 seconds of radius 300.00 at RipfieldAoE[RipfieldTempInit], dealing 12.00 damage of attack type Spells and damage type Normal
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RipFieldDamageTimes[RipfieldTempInit] Equal to 10
                • Then - Actions
                  • Set RipFieldCasterIndex[RipfieldTempInit] = RipFieldCasterIndex[RipFieldMaxIndex]
                  • Set RipFieldCasterIndex[RipFieldMaxIndex] = (Casting unit)
                  • Set RipFieldTimeCounter[RipfieldTempInit] = RipFieldTimeCounter[RipFieldMaxIndex]
                  • Set RipFieldTimeCounter[RipFieldMaxIndex] = 0
                  • Set RipFieldDamageTimes[RipfieldTempInit] = RipFieldDamageTimes[RipFieldMaxIndex]
                  • Set RipFieldDamageTimes[RipFieldMaxIndex] = 0
                  • Custom script: call RemoveLocation( udg_RipfieldAoE[udg_RipfieldTempInit])
                  • Set RipFieldMaxIndex = (RipFieldMaxIndex - 1)
                  • Set RipfieldTempInit = (RipfieldTempInit - 1)
                • Else - Actions
            • Else - Actions
No damage is done, however. I'm still quite very confused.....
 
Last edited:
Level 12
Joined
May 20, 2009
Messages
822
Still doesn't seem to be working...

  • Ripfield Test 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ripfield
    • Actions
      • Set RipFieldMaxIndex = (RipFieldMaxIndex + 1)
      • Set RipFieldCasterIndex[RipFieldMaxIndex] = (Triggering unit)
      • Set RipFieldTimeCounter[RipFieldMaxIndex] = 0
      • Set RipFieldDamageTimes[RipFieldMaxIndex] = 0
      • Set RipfieldAoE[RipFieldMaxIndex] = (Target point of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RipFieldMaxIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on Ripfield Test 1 pt2 <gen>
        • Else - Actions
  • Ripfield Test 1 pt2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Game - Display to (All players) the text: FIRED!
      • For each (Integer RipfieldTempInit) from 1 to RipFieldMaxIndex, do (Actions)
        • Loop - Actions
          • Set RipFieldTimeCounter[RipfieldTempInit] = RipFieldTimeCounter[(RipfieldTempInit + 1)]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RipFieldTimeCounter[RipfieldTempInit] Equal to 33
            • Then - Actions
              • Set RipFieldTimeCounter[RipfieldTempInit] = 0
              • Set RipFieldDamageTimes[RipfieldTempInit] = RipFieldDamageTimes[(RipFieldDamageTimes[RipfieldTempInit] + 1)]
              • Unit - Cause RipFieldCasterIndex[RipfieldTempInit] to damage circular area after 1.00 seconds of radius 300.00 at RipfieldAoE[RipfieldTempInit], dealing 12.00 damage of attack type Spells and damage type Normal
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RipFieldDamageTimes[RipfieldTempInit] Equal to 10
                • Then - Actions
                  • Set RipFieldCasterIndex[RipfieldTempInit] = RipFieldCasterIndex[RipFieldMaxIndex]
                  • Set RipFieldCasterIndex[RipFieldMaxIndex] = (Casting unit)
                  • Set RipFieldTimeCounter[RipfieldTempInit] = RipFieldTimeCounter[RipFieldMaxIndex]
                  • Set RipFieldTimeCounter[RipFieldMaxIndex] = 0
                  • Set RipFieldDamageTimes[RipfieldTempInit] = RipFieldDamageTimes[RipFieldMaxIndex]
                  • Set RipFieldDamageTimes[RipFieldMaxIndex] = 0
                  • Custom script: call RemoveLocation( udg_RipfieldAoE[udg_RipfieldTempInit])
                  • Set RipFieldMaxIndex = (RipFieldMaxIndex - 1)
                  • Set RipfieldTempInit = (RipfieldTempInit - 1)
                • Else - Actions
            • Else - Actions
I did the changes, is there still something wrong?

EDIT: I did a test, putting in a display text action, and it turns out that the second trigger is not even being turned on.
 
Level 12
Joined
May 20, 2009
Messages
822
I put
  • Game - Display to (All players) the text: FIRED!
as the first action, which means this trigger is not being turned on at all from the first trigger.

The spell is based off of Death & Decay, which is a point-target spell.

EDIT: I'm about to go to bed, so I probably won't reply again for a while.
 
Last edited:
Level 5
Joined
Jan 27, 2014
Messages
164
Not really solving the trigger issue here. Just another alternative. Perhaps you could just create a dummy at the point of target, give the dummy Permanent Immolation. Then set the dummy expiration duration to your desired time. The AOE, damage and damage interval can be set in the Permanent Immolation data field in Object Editor.
 
Level 12
Joined
May 20, 2009
Messages
822
Not really solving the trigger issue here. Just another alternative. Perhaps you could just create a dummy at the point of target, give the dummy Permanent Immolation. Then set the dummy expiration duration to your desired time. The AOE, damage and damage interval can be set in the Permanent Immolation data field in Object Editor.

That's a really good idea.

But after some testing, I've discovered that ALL of my triggers are broken and not firing at all. I'm extremely confused...

EDIT: It's just the map, so I'm gonna have to rebuild everything. I'll edit this comment if I get stuff working again.

EDIT2: Actually, that'd only work for units and not for Heroes. If you do that for Heroes, they won't gain XP from the killed unit.
 
Last edited:
Level 12
Joined
May 20, 2009
Messages
822
Chances are you made one mistake all new map makers make.
Setting every variable in the variable editor to 8191.
Most variable only need to be set to 1.
Check my tutorial things you should know when using triggers / gui.
The section on variable editor.

Okay...Thanks. It is firing now, as that message is popping up, but it's still not doing anything. Triggers are still the same. I don't understand whats wrong...
 
Level 12
Joined
May 20, 2009
Messages
822
I believe the problem is here. It was my mistake.

In the trigger that loops every 0.03 seconds change this line.
  • Set RipFieldCasterIndex[RipFieldMaxIndex] = (Casting unit)
To this
  • Set RipFieldCasterIndex[RipFieldMaxIndex] = No unit

I will change that, but that wasn't the issue. That part of the trigger cannot even fire.

  • Ripfield Test 1 pt2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Game - Display to (All players) the text: FIRED!
      • For each (Integer RipfieldTempInit) from 1 to RipFieldMaxIndex, do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: FIRED!
          • Set RipFieldTimeCounter[RipfieldTempInit] = RipFieldTimeCounter[(RipfieldTempInit + 1)]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RipFieldTimeCounter[RipfieldTempInit] Equal to 33
            • Then - Actions
              • Game - Display to (All players) the text: FIRED! <--- Does not trigger
            • Else - Actions
When it gets to there, nothing else happens.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
You do know that that will tell you nothing as you are displaying the same message. This is displaying 3 of the exact same messages every 0.03 seconds. So about 33.33 times per second. And that is only for one spell instance.
You have to display different messages when debugging.
There is another problem though. Look at the integer increase.
  • Set RipFieldTimeCounter[RipfieldTempInit] = RipFieldTimeCounter[(RipfieldTempInit + 1)]
Should be this.
  • Set RipFieldTimeCounter[RipfieldTempInit] = (RipFieldTimeCounter[RipfieldTempInit] + 1)
That would easily cause a problem.

Also this is wrong.
  • Set RipFieldDamageTimes[RipfieldTempInit] = RipFieldDamageTimes[(RipFieldDamageTimes[RipfieldTempInit] + 1)]
It should be this.
  • Set RipFieldDamageTimes[RipfieldTempInit] = (RipFieldDamageTimes[RipfieldTempInit] + 1)
Make sure you copy things correctly.
 
Level 12
Joined
May 20, 2009
Messages
822
WOW! That was a hugely simple mistake! Sorry about that, I'm a little bit dyslexic sometimes. =p

Just one more thing, since it's a channeling spell, when the caster stops casting the damage needs to stop happening, which again I have no idea how and that was actually a problem with the trigger I originally made, too.

Perhaps I should use a different AoE spell, one that puts a buff on units, and then deal damage to all units in the AoE if they have that buff? That way, if the spell is no longer being cast, the buff won't be on any units, and if it's not on any units, no damage would be done.

Yes? No?
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
I always stay away from buffs.
Since this is a channel spell you need to use an event that catches the end of the channeling.
Then change a boolean variable for the unit and check that boolean before doing damage. This way you can force a de-index.
But it would be very inefficient to do so. You need to change this from indexed array to a unit indexer method of indexing. This will make it more efficient and allow for channeling effect.
 
Level 12
Joined
May 20, 2009
Messages
822
Well, I don't really know how to do that last bit you said there...

To do the de-index, I would just check if the boolean is false and if so just do

  • Set RipFieldMaxIndex = (RipFieldMaxIndex - 1)
  • etc
  • etc
?

(I really appreciate the amount of help you're giving, by the way. =p)

EDIT: It does not appear to be MUI-Compatible, still. Which I am fine with but since you were pushing so hard to make that happen it's a bit upsetting. xD
 
Last edited:
Level 12
Joined
May 20, 2009
Messages
822
I do still need help with this. I'm still quite confused as to what the issue is, as it cannot be cast by more then one unit at a time. (It's not MUI. =p)

I'm gonna post my triggers again, just to be safe in case something different is wrong now that wasn't wrong before.

  • Ripfield Test 1 pt2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Game - Display to (All players) the text: FIRED!
      • For each (Integer RipfieldTempInit) from 1 to RipFieldMaxIndex, do (Actions)
        • Loop - Actions
          • Set RipFieldTimeCounter[RipfieldTempInit] = (RipFieldTimeCounter[RipfieldTempInit] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RipFieldTimeCounter[RipfieldTempInit] Equal to 33
            • Then - Actions
              • Set RipFieldTimeCounter[RipfieldTempInit] = 0
              • Set RipFieldDamageTimes[RipfieldTempInit] = (RipFieldDamageTimes[RipfieldTempInit] + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • IsCastingCheck[RipFieldMaxIndex] Equal to True
                • Then - Actions
                  • Unit - Cause RipFieldCasterIndex[RipfieldTempInit] to damage circular area after 1.00 seconds of radius 300.00 at RipfieldAoE[RipfieldTempInit], dealing 12.00 damage of attack type Spells and damage type Normal
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RipFieldDamageTimes[RipfieldTempInit] Equal to 10
                • Then - Actions
                  • Set RipFieldCasterIndex[RipfieldTempInit] = RipFieldCasterIndex[RipFieldMaxIndex]
                  • Set RipFieldCasterIndex[RipFieldMaxIndex] = No unit
                  • Set RipFieldTimeCounter[RipfieldTempInit] = RipFieldTimeCounter[RipFieldMaxIndex]
                  • Set RipFieldTimeCounter[RipFieldMaxIndex] = 0
                  • Set RipFieldDamageTimes[RipfieldTempInit] = RipFieldDamageTimes[RipFieldMaxIndex]
                  • Set RipFieldDamageTimes[RipFieldMaxIndex] = 0
                  • Custom script: call RemoveLocation( udg_RipfieldAoE[udg_RipfieldTempInit])
                  • Set RipFieldMaxIndex = (RipFieldMaxIndex - 1)
                  • Set RipfieldTempInit = (RipfieldTempInit - 1)
                • Else - Actions
            • Else - Actions
I do have absolutely no experience in this, so I definitely still need help. I am bumping this as it is getting buried a bit.

EDIT: Okay, so, I did another test. I put this in the first trigger:

  • Game - Display to (All players) the text: ((Proper name of RipFieldCasterIndex[RipFieldMaxIndex]) + Is casting Ripfield!)
And it displays each heroes name properly.

There's no problem with the distinguishing of the different casters. The problem is somewhere else, maybe distinguishing the target point or the damage?
It does seem to successfully happen sometimes, but it doesn't seem to always work...
 
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,543
You forgot to de-index the locations.
  • Set RipFieldCasterIndex[RipfieldTempInit] = RipFieldCasterIndex[RipFieldMaxIndex]
  • Set RipFieldCasterIndex[RipFieldMaxIndex] = No unit
  • Set RipFieldTimeCounter[RipfieldTempInit] = RipFieldTimeCounter[RipFieldMaxIndex]
  • Set RipFieldTimeCounter[RipFieldMaxIndex] = 0
  • Set RipFieldDamageTimes[RipfieldTempInit] = RipFieldDamageTimes[RipFieldMaxIndex]
  • Set RipFieldDamageTimes[RipFieldMaxIndex] = 0
  • Custom script: call RemoveLocation( udg_RipfieldAoE[udg_RipfieldTempInit])
  • Set RipFieldMaxIndex = (RipFieldMaxIndex - 1)
  • Set RipfieldTempInit = (RipfieldTempInit - 1)
Needs to be this.
  • Set RipFieldCasterIndex[RipfieldTempInit] = RipFieldCasterIndex[RipFieldMaxIndex]
  • Set RipFieldCasterIndex[RipFieldMaxIndex] = No unit
  • Set RipFieldTimeCounter[RipfieldTempInit] = RipFieldTimeCounter[RipFieldMaxIndex]
  • Set RipFieldTimeCounter[RipFieldMaxIndex] = 0
  • Set RipFieldDamageTimes[RipfieldTempInit] = RipFieldDamageTimes[RipFieldMaxIndex]
  • Set RipFieldDamageTimes[RipFieldMaxIndex] = 0
  • Custom script: call RemoveLocation( udg_RipfieldAoE[udg_RipfieldTempInit])
  • Set udg_RipfieldAoE[udg_RipfieldTempInit] = udg_RipfieldAoE[RipFieldMaxIndex ]
  • Set RipFieldMaxIndex = (RipFieldMaxIndex - 1)
  • Set RipfieldTempInit = (RipfieldTempInit - 1)
As for using a unit indexer it drastically changes the trigger.
If you really want this to be channeling this can be done. It requires a huge change though.
 
Level 18
Joined
May 11, 2012
Messages
2,103
Does your spell damages everyone in that circle or your enemies only?
This is very easy thing to do, and yes, follow DIMF's tutorial as it is efficient and proper way to make it MUI.
At first, I was also being confused when I first looked at his tutorial because I had no idea what's happening in that tut despite the explanation :D

I will make trigger now.
 

Attachments

  • Spell.w3x
    20.8 KB · Views: 34
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,543
Does your spell damages everyone in that circle or your enemies only?
This is very easy thing to do, and yes, follow DIMF's tutorial as it is efficient and proper way to make it MUI.
At first, I was also being confused when I first looked at his tutorial because I had no idea what's happening in that tut despite the explanation :D

I will make trigger now.

You should not do that large loop like that. Yes it can be done like that but it is incredibly inefficient and slow.
Also don't use 1.00 seconds for spells it just looks horrible.
The way I posted above is both efficient and works.

If you want to do it with channeling change it over to unit indexer method. Then it will be efficient and ability to end when channeling has ended.
 
Level 12
Joined
May 20, 2009
Messages
822
I don't know what I changed, but it started working.

Anyway, for future references, in case anyone wants to do this, this is how I made it stop doing damage when the casting is cancelled/interrupted:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • IsCastingCheck[RipFieldMaxIndex] Equal to True
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Ripfield for RipFieldCasterIndex[RipFieldMaxIndex]) Equal to 1
        • Then - Actions
          • Unit - Cause RipFieldCasterIndex[RipFieldMaxIndex] to damage circular area after 0.00 seconds of radius 300.00 at RipfieldAoE[RipfieldTempInit], dealing 14.00 damage of attack type Spells and damage type Normal
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Ripfield for RipFieldCasterIndex[RipFieldMaxIndex]) Equal to 2
            • Then - Actions
              • Unit - Cause RipFieldCasterIndex[RipFieldMaxIndex] to damage circular area after 0.00 seconds of radius 300.00 at RipfieldAoE[RipfieldTempInit], dealing 26.00 damage of attack type Spells and damage type Normal
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Ripfield for RipFieldCasterIndex[RipFieldMaxIndex]) Equal to 3
                • Then - Actions
                  • Unit - Cause RipFieldCasterIndex[RipFieldMaxIndex] to damage circular area after 0.00 seconds of radius 300.00 at RipfieldAoE[RipfieldTempInit], dealing 38.00 damage of attack type Spells and damage type Normal
                • Else - Actions
    • Else - Actions
  • Ripfield Interrupted
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Casting unit) Equal to RipFieldCasterIndex[RipFieldMaxIndex]
    • Actions
      • Set IsCastingCheck[RipFieldMaxIndex] = False
      • Set RipFieldCasterIndex[RipfieldTempInit] = RipFieldCasterIndex[RipFieldMaxIndex]
      • Set RipFieldCasterIndex[RipFieldMaxIndex] = No unit
      • Set RipFieldTimeCounter[RipfieldTempInit] = RipFieldTimeCounter[RipFieldMaxIndex]
      • Set RipFieldTimeCounter[RipFieldMaxIndex] = 0
      • Set RipFieldDamageTimes[RipfieldTempInit] = RipFieldDamageTimes[RipFieldMaxIndex]
      • Set RipFieldDamageTimes[RipFieldMaxIndex] = 0
      • Custom script: call RemoveLocation( udg_RipfieldAoE[udg_RipfieldTempInit])
      • Set RipFieldMaxIndex = (RipFieldMaxIndex - 1)
      • Set RipfieldTempInit = (RipfieldTempInit - 1)
I think this is what Death suggested to do, and as far as I'm concerned it works. xD

Does your spell damages everyone in that circle or your enemies only?
This is very easy thing to do, and yes, follow DIMF's tutorial as it is efficient and proper way to make it MUI.
At first, I was also being confused when I first looked at his tutorial because I had no idea what's happening in that tut despite the explanation :D

I will make trigger now.

I do want the spell to damage all units in the AoE and not just enemies/neutral.

I don't know if there is a way to make it just enemies/neutral anyway. xD
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
  • Ripfield Interrupted
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Casting unit) Equal to RipFieldCasterIndex[RipFieldMaxIndex]
    • Actions
      • Set IsCastingCheck[RipFieldMaxIndex] = False
      • Set RipFieldCasterIndex[RipfieldTempInit] = RipFieldCasterIndex[RipFieldMaxIndex]
      • Set RipFieldCasterIndex[RipFieldMaxIndex] = No unit
      • Set RipFieldTimeCounter[RipfieldTempInit] = RipFieldTimeCounter[RipFieldMaxIndex]
      • Set RipFieldTimeCounter[RipFieldMaxIndex] = 0
      • Set RipFieldDamageTimes[RipfieldTempInit] = RipFieldDamageTimes[RipFieldMaxIndex]
      • Set RipFieldDamageTimes[RipFieldMaxIndex] = 0
      • Custom script: call RemoveLocation( udg_RipfieldAoE[udg_RipfieldTempInit])
      • Set RipFieldMaxIndex = (RipFieldMaxIndex - 1)
      • Set RipfieldTempInit = (RipfieldTempInit - 1)
I think this is what Death suggested to do, and as far as I'm concerned it works. xD

You never de-index the above location. Please look at my post above.
Also you should use a formula rather than a bunch of ITEs for your trigger.

I do not understand why should I not use 1 second loop, and how does it look horrible?

It looks horrible because there is always a delay.
With 1.00 you can have up to a .999999 second delay before first cast.
With 0.03 you can have up to a .029999 second delay before first cast.
That may seem small but it is very noticeable.
 
If you want exact timing then use Ruke's MUI system in the spells section, you don't even need to learn indexing to make MUI or MPI stuff.

Ruke's system seems to have no delay as well.

Edit: If you use Ruke's system then it'll be an advantage to you as a GUI'er for it has no need of extra variables like using JASS and its syntax's except it is kind of better then normal JASS too since you don't need to rename or anything.

I am sure people will deny it and indexing is better, but that's only until you hit 1000 variables in the variable editor, then they might reconsider.
 

Attachments

  • ripfield.w3x
    25.1 KB · Views: 34
Level 29
Joined
Oct 24, 2012
Messages
6,543
If you want exact timing then use Ruke's MUI system in the spells section, you don't even need to learn indexing to make MUI or MPI stuff.

Ruke's system seems to have no delay as well.

I believe he uses timers. Which makes it much more accurate. The time they are off is minimal.

Everyone should still learn how to do some form of indexing.
 
No they shouldn't though.... WC3 will die? Nope SC2 would first unless they allow private servers too and besides as long as someone has a copy of WC3 on their pc it means it is alive. I am pretty sure people would rather to go to torchlight 2 or some other game that has a way better editor if WC3 goes. No offense. I am sure most people would rather move onto WC4 then SC2.

Yeah it really is hard to learn, everyone has different levels of intelligence. Let's take this to PM's or something though if you want to continue.
 
Status
Not open for further replies.
Top