• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Trigger] Another Invisible Bug

Status
Not open for further replies.
Level 9
Joined
Sep 5, 2007
Messages
358
Okay, I've created a really simple damage over time system for my own spells but it for some reason is dealing damage every 0.25 seconds instead of every 1 second. I also compared the triggering to one similar system from a tutorial, which works buglessly, it was just like it except for the variable names and it still doesn't work.

Here is the trigger:

  • Damage Over Time
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • For each (Integer DOT_i_Index[3]) from 1 to DOT_i_Index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DOT_r_Duration[DOT_i_Index[3]] Greater than 0.00
            • Then - Actions
              • Set DOT_r_Duration[DOT_i_Index[3]] = (DOT_r_Duration[DOT_i_Index[3]] - 0.25)
              • Set DOT_r_IntervalCheck[DOT_i_Index[3]] = (DOT_r_IntervalCheck[DOT_i_Index[3]] + 0.25)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DOT_r_IntervalCheck[DOT_i_Index[3]] Greater than or Equal to 1.00
                • Then - Actions
                  • Set DOT_r_IntervalCheck[DOT_i_Index[3]] = 0.00
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (DOT_u_TargetUnit[DOT_i_Index[3]] is alive) Equal to True
                    • Then - Actions
                      • Unit - Cause DOT_u_SourceUnit[DOT_i_Index[3]] to damage DOT_u_TargetUnit[DOT_i_Index[3]], dealing DOT_r_DamagePerInterval[DOT_i_Index[3]] damage of attack type Spells and damage type Normal
                      • Special Effect - Create a special effect attached to the chest of DOT_u_TargetUnit[DOT_i_Index[3]] using DOT_s_Effect[DOT_i_Index[3]]
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                      • Set DOT_r_Duration[DOT_i_Index[3]] = 0.00
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DOT_r_Duration[DOT_i_Index[3]] Equal to 0.00
                • Then - Actions
                  • Set DOT_i_Index[1] = (DOT_i_Index[1] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DOT_i_Index[1] Equal to 0
                    • Then - Actions
                      • Set DOT_i_Index[2] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
            • Else - Actions
Thanks in advance

Wizzy..
 
Level 9
Joined
Sep 5, 2007
Messages
358
lol its set to .25 seconds in your trigger? if you want it to 1 set it to ever 1

but that's not that good because if there are more units being damaged over time they will all receive damage all at the same time and it's really ugly.

Starquizer said:
In stead of using the events every X sec of game time use repeating timers; they are much better and works properly with the game speed.
I think they're better in JASS, as for GUI using this method seems to be better, it's actually how everybody does.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
I have to do those names because of the indexing method to make my stuff MUI. Also that system is independent seeing the map wouldn't help at all
I understand that but you could make the MUI index a normal integer not array and simple its name like i or mui something like that and when you finish your system/spell rename it what you want but at least it will make working with the triggers more easier.

Anyway I'll try and look at the trigger again but is it related to another trigger you didn't post or not ?
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
It's like I introduce the values into variables that will be used by this sytem, but they're only valuables. The problem must be inside this trigger
I checked your trigger. Are you sure that the unit takes damage every 0.25 sec; I can't find any problem with the trigger your conditions are right and it will cause unit to take damage every 1 sec according to the variable IntCheck which become =1 every sec. I don't know what wrong; try to check the variables and the other triggers that run this one.

And sorry that I wasn't able to help you.
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
no problem man. But I think I found a way.
Instead of this interval checking I can multiple the damage by 0.25 and it will deal 25% of the damage every 0.25. In the end it will deal the amount I wanted.
I thought of that as well but I hate to have a trigger problem and be unable to solve it. Anyway good luck with your triggering :wink:.
 
Status
Not open for further replies.
Top