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

[Spell] Set Ability Real Level Field not working (never had this issue)

Status
Not open for further replies.
Level 12
Joined
May 16, 2020
Messages
660
Hi guys,

This might be a simple error on my side, but I spent now 2 hours looking for anything that is wrong and I cannot find the mistake.

The problem is that movement speed value of the dummy ability "Frost Shield (Dummy)" is not being adjusted correctly via "Set Ability Real Level Field". For testing purposes I try to adjust it to 50% slow upon being triggered, but in-game the "Slo1" Field stays at 0% movement speed.

I used the Ability Real Level Field many times successfully, (multiple times with slow + movement speed adjustment only) but here is simply refuses to work:
  • Frost Shield
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Frost Shield
    • Actions
      • For each (Integer FS_Integer) from 1 to FS_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FS_Caster[FS_Integer] Equal to (Triggering unit)
            • Then - Actions
              • Set VariableSet FS_Counter[FS_Integer] = 0
              • Set VariableSet FS_Level = (Level of Frost Shield for FS_Caster[FS_Integer])
              • Set VariableSet FS_Damage[FS_Integer] = (10.00 + (10.00 x (Real(FS_Level))))
              • Set VariableSet FS_Slow[FS_Integer] = (0.15 + (0.05 x (Real(FS_Level))))
              • Skip remaining actions
            • Else - Actions
      • Set VariableSet FS_Index = (FS_Index + 1)
      • Set VariableSet FS_Caster[FS_Index] = (Triggering unit)
      • Set VariableSet FS_Target[FS_Index] = (Target unit of ability being cast)
      • Set VariableSet FS_Level = (Level of Frost Shield for FS_Caster[FS_Index])
      • Set VariableSet FS_Counter[FS_Index] = 0
      • Set VariableSet FS_Damage[FS_Index] = (10.00 + (10.00 x (Real(FS_Level))))
      • Set VariableSet FS_Slow[FS_Index] = (0.15 + (0.05 x (Real(FS_Level))))
      • -------- --------
      • Set VariableSet FS_CV = (Custom value of FS_Target[FS_Index])
      • Set VariableSet FS_DamageReduction[FS_CV] = (1.00 - (0.20 + (0.10 x (Real(FS_Level)))))
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FS_Index Equal to 1
        • Then - Actions
          • Countdown Timer - Start FS_Timer as a Repeating timer that will expire in 0.10 seconds
          • Trigger - Turn on Frost Shield Loop <gen>
          • Trigger - Turn on Frost Shield Reduction <gen>
        • Else - Actions
  • Frost Shield Loop
    • Events
      • Time - FS_Timer expires
    • Conditions
    • Actions
      • For each (Integer FS_Integer) from 1 to FS_Index, do (Actions)
        • Loop - Actions
          • Set VariableSet FS_Counter[FS_Integer] = (FS_Counter[FS_Integer] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (FS_Counter[FS_Integer] mod 10) Equal to 0
              • (FS_Target[FS_Integer] has buff Frost Shield ) Equal to True
              • (FS_Target[FS_Integer] is alive) Equal to True
            • Then - Actions
              • Set VariableSet FS_Point = (Position of FS_Target[FS_Integer])
              • Special Effect - Create a special effect attached to the origin of FS_Target[FS_Integer] using war3mapImported\stomp.mdx
              • Special Effect - Destroy (Last created special effect)
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within 600.00 of FS_Point.) and do (Actions)
                • Loop - Actions
                  • Set VariableSet FS_UnitTemp = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (FS_UnitTemp is A structure) Equal to False
                      • (FS_UnitTemp is alive) Equal to True
                      • (FS_UnitTemp belongs to an enemy of (Owner of FS_Caster[FS_Integer]).) Equal to True
                    • Then - Actions
                      • Unit - Cause FS_Caster[FS_Integer] to damage FS_UnitTemp, dealing FS_Damage[FS_Integer] damage of attack type Spells and damage type Magic
                      • Unit - Create 1 Dummy (Ground/Speed 0) for (Owner of FS_Caster[FS_Integer]) at FS_Point facing Default building facing degrees
                      • Set VariableSet FS_Dummy = (Last created unit)
                      • Unit - Add Frost Shield (Dummy) to FS_Dummy
                      • Ability - Set Ability: (Unit: FS_Dummy's Ability with Ability Code: Frost Shield (Dummy))'s Real Level Field: Movement Speed Factor ('Slo1') of Level: 0 to 0.50
                      • Game - Display to (All players) the text: SLOW
                      • Unit - Order FS_Dummy to Human Sorceress - Slow FS_UnitTemp
                      • Unit - Add a 0.50 second Generic expiration timer to FS_Dummy
                    • Else - Actions
              • Custom script: call RemoveLocation(udg_FS_Point)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • FS_Counter[FS_Integer] Greater than or equal to 60
                  • (FS_Target[FS_Integer] has buff Frost Shield ) Equal to False
            • Then - Actions
              • Set VariableSet FS_Caster[FS_Integer] = FS_Caster[FS_Index]
              • Set VariableSet FS_Target[FS_Integer] = FS_Target[FS_Index]
              • Set VariableSet FS_Counter[FS_Integer] = FS_Counter[FS_Index]
              • Set VariableSet FS_Damage[FS_Integer] = FS_Damage[FS_Index]
              • Set VariableSet FS_Slow[FS_Integer] = FS_Slow[FS_Index]
              • -------- --------
              • Set VariableSet FS_Index = (FS_Index - 1)
              • Set VariableSet FS_Integer = (FS_Integer - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FS_Index Equal to 0
                • Then - Actions
                  • Countdown Timer - Pause FS_Timer
                  • Trigger - Turn off Frost Shield Reduction <gen>
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
  • Frost Shield Reduction
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageAttack Equal to True
      • (DamageEventTarget has buff Frost Shield ) Equal to True
    • Actions
      • Set VariableSet FS_CV = (Custom value of DamageEventTarget)
      • Set VariableSet DamageEventAmount = (DamageEventAmount x FS_DamageReduction[FS_CV])

Here a screenshot of the Dummy ability:
capture-png.369847


The fact that it just doesn't work for this spell tells me that the error is for sure on my side, but I honestly don't see any mistake... can anyone help please?
 

Attachments

  • Capture.PNG
    Capture.PNG
    24.2 KB · Views: 121

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,558
So it applies the Slow debuff but at the default 0%? Try giving the Dummy one of your Slows that does work and see if anything changes.

Also, try "refreshing" the Slow ability. Give it 2 Levels in the Object Editor, and then go into your trigger and after adjusting it's Slow Factor also set it's Level to 2 and then back to 1.
 
Last edited:
Status
Not open for further replies.
Top