• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Local Player and Ability Modify

Status
Not open for further replies.
Level 20
Joined
Jul 12, 2010
Messages
1,737
Hello everybody, I was testing locally changing Ability Descriptions and Icons and it seems to work BUT I want to be 100% it doesn't desync before I start mass implementing it into my map.

  • Chat
    • Events
      • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -1
        • Then - Actions
          • Ability - Set Tooltip of Ability Test 1 to Weapon +2 for level 0
          • Ability - Set Extended Tooltip of Ability Test 1 to Testing New Description|n|nNew Trigger for level 0
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entered chat string) Equal to -2
            • Then - Actions
              • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
              • Ability - Set Tooltip of Ability Test 1 to Weapon +3 Local for level 0
              • Ability - Set Extended Tooltip of Ability Test 1 to Testing New Description|n|nNew Trigger Local Player for level 0
              • Custom script: endif
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Entered chat string) Equal to -3
                • Then - Actions
                  • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
                  • Ability - Set Icon of Ability Test 2 to ReplaceableTextures\CommandButtons\BTNMoonArmor.blp
                  • Ability - Set Tooltip of Ability Test 2 to Armor +5 for level 0
                  • Ability - Set Extended Tooltip of Ability Test 2 to Your Hero now has an amazing armor! for level 0
                  • Custom script: endif
                • Else - Actions

I also tested this on LAN and it didn't cause any desyncs but again I want to be 100% sure because I was super surprised that these triggers seem to be asynchronous.

Warcraft_III_QRUyObJVxh.jpg

I attached the test map if anybody wants to give it a go.
 

Attachments

  • Desync Test.w3m
    18.2 KB · Views: 7

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
If that doesn't answer your question, I believe @Tasyen would know (thanks!)
 
They need to be async as the game supports many languages, all of them most likely have an unique tooltip. And the tooltips do not matter for the gamestate anyway, they are for the player not for the game.
It is said that: there can be a desync because of a dismatching stringlist, I don't believe it. But if you want to be 100% safe create the strings in sync space and then in GetLocalPlayer use the value you created outside of GetLocalPlayer. (Edit: oh the Linked posts say something similiar)

  • At 0s
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set NewTooltip = Whatever
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Local Player Equal to (Triggering player)
        • Then - Actions
          • Ability - Set Tooltip of Holy Light to NewTooltip for level 0
        • Else - Actions
 
Status
Not open for further replies.
Top