• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

unit - set unit weapon real field, not working?

Level 5
Joined
Mar 7, 2024
Messages
76
I tried it and it doesn't work : attack base cooldown doesn't really work? Do you guys have any idea how it works? I want the hero's attack speed to be faster by changing it with activation.

  • TESTTT
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
      • Player - Player 2 (Blue) skips a cinematic sequence
      • Player - Player 3 (Teal) skips a cinematic sequence
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
        • Loop - Actions
          • Unit - Set Unit: (Picked unit)'s Weapon Real Field: Attack Base Cooldown ('ua1c')at Index:0 to Value: 300.00
          • Unit - Set life of (Picked unit) to 100.00%
          • Unit - Set mana of (Picked unit) to 100.00%
          • Unit - Reset ability cooldowns for (Picked unit)
 
Level 26
Joined
Sep 26, 2009
Messages
2,418
The following works for me just fine:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • bool Equal to True
        • Then - Actions
          • Set VariableSet bool = False
          • Unit - Set Unit: Footman 0000 <gen>'s Weapon Real Field: Attack Base Cooldown ('ua1c')at Index:0 to Value: 2.00
        • Else - Actions
          • Set VariableSet bool = True
          • Unit - Set Unit: Footman 0000 <gen>'s Weapon Real Field: Attack Base Cooldown ('ua1c')at Index:0 to Value: 0.30
 
Level 5
Joined
Mar 7, 2024
Messages
76
Have you tried a reasonable value? 300.00 is 300 seconds between attacks. Try something like 0.50.

Edit:
There's a working action for this called Set Attack Interval:
  • Unit - Set Attack Interval of ... to ... for weapon index: 1
Tried 0.50 but it doesn't work, Set Attack Interval also doesn't work, something is missing in the word editor that makes it not work? Have you tried it and does it work?

edit:i tried Unit - Set Attack Interval in version 1.29 and it worked. So is version 1.31 having problems?
 
Last edited:
Level 5
Joined
Mar 7, 2024
Messages
76
The following works for me just fine:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • bool Equal to True
        • Then - Actions
          • Set VariableSet bool = False
          • Unit - Set Unit: Footman 0000 <gen>'s Weapon Real Field: Attack Base Cooldown ('ua1c')at Index:0 to Value: 2.00
        • Else - Actions
          • Set VariableSet bool = True
          • Unit - Set Unit: Footman 0000 <gen>'s Weapon Real Field: Attack Base Cooldown ('ua1c')at Index:0 to Value: 0.30

Does yours work? I tried your method but it doesn't work.
  • TESTT
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • bool Equal to True
        • Then - Actions
          • Set bool = False
          • Unit - Set Unit: Footman 0003 <gen>'s Weapon Real Field: Attack Base Cooldown ('ua1c')at Index:0 to Value: 2.00
          • Game - Display to (All players) the text: Test
        • Else - Actions
          • Set bool = True
          • Unit - Set Unit: Footman 0003 <gen>'s Weapon Real Field: Attack Base Cooldown ('ua1c')at Index:0 to Value: 0.30
          • Game - Display to (All players) the text: Test2
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,703
Do you see the text messages though? Try to explain in detail what doesn't work or we can't be certain.

Guessing:
1) You aren't pressing the correct hotkey for the Event.
2) The Actions never run (you don't see either text message).
3) You're looking at the wrong Footman.
4) You're modifying the wrong weapon index.
5) You're on a broken patch (unlikely).
 
Level 5
Joined
Mar 7, 2024
Messages
76
Do you see the text messages though? Try to explain in detail what doesn't work or we can't be certain.

Guessing:
1) You aren't pressing the correct hotkey for the Event.
2) The Actions never run (you don't see either text message).
3) You're looking at the wrong Footman.
4) You're modifying the wrong weapon index.
5) You're on a broken patch (unlikely).
5)
I'm thinking it's because my word editor has a problem with missing files and it's not working? ,everything still works text and weapon index properly.

edit: i tried Unit - Set Attack Interval in version 1.29 and it worked. So is version 1.31 having problems?

HOII.PNG
 
Top