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

[Trigger] Problem with Floatingtexts, Loops, Timers and opening a Door.

Status
Not open for further replies.
Level 2
Joined
May 17, 2018
Messages
16
Hello there,

I am trying to make this map where you open the door by typing in a text.(basically the purple text is what u have to input and the red and green lines are a time indicator)

upload_2018-5-21_15-45-27-png.298484


I tried to make sure i stay below the 100 Floating text. The purple text is 1 floating text each and every single red and green bar are their very own floating texts, which should make for 50 floating texts @ 10 players.
Once the time is up (all green lines turn to red) a new purple floating text is created, all Lines are destroyed and new green ones are created. The Integer that is saved in the hashtable is the number of a random player(Will gladly post that trigger aswell if you need it just keeping it out atm to not cause extra confusion).

The problem is even tho it works for most players theres always some player where the floating text isnt displayed properly (missing purple text or just 2 redlines and other magical stuff). Also apparently each Big cycle there is a chance for the problem to get worse. At this point i am Not 90% sure that this trigger is the sole origin of my problems. If you want the whole map I will gladly upload it aswell.

Any help is much appreciated.


First Trigger:

  • TimeToHackTimerExpires
    • Events
      • Time - TimeLimitToHackTimer[0] expires
      • Time - TimeLimitToHackTimer[1] expires
      • Time - TimeLimitToHackTimer[2] expires
      • Time - TimeLimitToHackTimer[3] expires
      • Time - TimeLimitToHackTimer[4] expires
      • Time - TimeLimitToHackTimer[5] expires
      • Time - TimeLimitToHackTimer[6] expires
      • Time - TimeLimitToHackTimer[7] expires
      • Time - TimeLimitToHackTimer[8] expires
      • Time - TimeLimitToHackTimer[9] expires
      • Time - TimeLimitToHackTimer[10] expires
      • Time - TimeLimitToHackTimer[11] expires
      • Time - TimeLimitToHackTimer[12] expires
      • Time - TimeLimitToHackTimer[13] expires
      • Time - TimeLimitToHackTimer[14] expires
      • Time - TimeLimitToHackTimer[15] expires
      • Time - TimeLimitToHackTimer[16] expires
      • Time - TimeLimitToHackTimer[17] expires
      • Time - TimeLimitToHackTimer[18] expires
      • Time - TimeLimitToHackTimer[19] expires
      • Time - TimeLimitToHackTimer[20] expires
      • Time - TimeLimitToHackTimer[21] expires
    • Conditions
    • Actions
      • Floating Text - Change the color of TimeLimittoHack[((TimeLimittoHackRedCount[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] x -1) + ((Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable)) x 6))] to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PrisonDoorOpen[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] Equal to False
          • TimeLimittoHackRedCount[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] Equal to 4
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PrisonDoorOpen[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] Equal to False
              • OtherPlayersNowInControl Equal to True
            • Then - Actions
              • Floating Text - Destroy FloatingText[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))]
              • For each (Integer B) from 1 to 4, do (Actions)
                • Loop - Actions
                  • Floating Text - Destroy TimeLimittoHack[(((Integer B) x -1) + (6 x (Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))))]
              • -------- PrisonDoorLife --------
              • Set PrisonDoorDmgFactor[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] = (PrisonDoorDmgFactor[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] - 1)
              • Destructible - Set life of PrisonWalls[PlayerinControlIsInRegion[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))]] to (100.00 - ((Real(PrisonDoorDmgFactor[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))])) x 10.00))%
              • -------- Textgenerating --------
              • Set RandomSubStringNumber[0] = (Random integer number between 1 and 25)
              • Set RandomSubStringNumber[1] = (Random integer number between 1 and 25)
              • Set RandomSubStringNumber[2] = (Random integer number between 1 and 24)
              • Set NeedToWriteTextToHack[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] = (ABC[(Random integer number between 0 and 25)] + (ABC[(Random integer number between 0 and 25)] + ABC[(Random integer number between 26 and 33)]))
              • Floating Text - Create floating text that reads NeedToWriteTextToHack[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] at ((Center of Wall1Regions[PlayerinControlIsInRegion[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))]]) offset by (0.00, 350.00)) with Z offset 0.00, using font size 12.00, color (100.00%, 10.00%, 100.00%), and 0.00% transparency
              • Floating Text - Show (Last created floating text) for (All players)
              • Set FloatingText[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] = (Last created floating text)
              • For each (Integer B) from 1 to 4, do (Actions)
                • Loop - Actions
                  • Floating Text - Create floating text that reads | at ((Center of Wall1Regions[PlayerinControlIsInRegion[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))]]) offset by ((100.00 + (15.00 x (Real((Integer B))))), 350.00)) with Z offset 0.00, using font size 12.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
                  • Set TimeLimittoHack[(((Integer B) x -1) + (6 x (Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))))] = (Last created floating text)
                  • Floating Text - Show (Last created floating text) for (All players)
              • Set TimeLimittoHackRedCount[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] = 0
              • Set TimeLimittoHackRedCount[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] = (TimeLimittoHackRedCount[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] + 1)
              • Countdown Timer - Start TimeLimitToHackTimer[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] as a One-shot timer that will expire in 1.00 seconds
              • Hashtable - Save (Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable)) as (Key (Last started timer)) of (Key (Last started timer)) in Timers_Hashtable
            • Else - Actions
              • Set TimeLimittoHackRedCount[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] = 0
              • Floating Text - Destroy FloatingText[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))]
              • For each (Integer B) from 1 to 4, do (Actions)
                • Loop - Actions
                  • Floating Text - Destroy TimeLimittoHack[(((Integer B) x -1) + (6 x (Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))))]
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • OtherPlayersNowInControl Equal to True
            • Then - Actions
              • Set TimeLimittoHackRedCount[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] = (TimeLimittoHackRedCount[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] + 1)
              • Countdown Timer - Start TimeLimitToHackTimer[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] as a One-shot timer that will expire in 1.00 seconds
              • Hashtable - Save (Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable)) as (Key (Last started timer)) of (Key (Last started timer)) in Timers_Hashtable
            • Else - Actions
              • Floating Text - Destroy FloatingText[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))]
              • For each (Integer B) from 1 to 4, do (Actions)
                • Loop - Actions
                  • Floating Text - Destroy TimeLimittoHack[(((Integer B) x -1) + (6 x (Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))))]
              • Set TimeLimittoHackRedCount[(Load (Key (Expiring timer)) of (Key (Expiring timer)) from (Last created hashtable))] = 0
 
Level 13
Joined
Oct 12, 2016
Messages
769
So, it's basically a typing minigame to open a gate in a set amount of time.
Is it only 1 message to type per door? Could any player at any given time type the message?
 
Level 2
Joined
May 17, 2018
Messages
16
You have to type multiple messages to open a door. Always the one that is currently displayed. And each player has their own door that requires its own message to open the door. What further comlicates it is that the doors assigned to players change with each "round" of this minigame
 
Level 2
Joined
May 17, 2018
Messages
16
I will do that however read lots of stuff regarding issues wen using a variable when using hashtable.
 
Status
Not open for further replies.
Top