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

[Solved] hashtable for strings

Level 2
Joined
Sep 16, 2016
Messages
21
I wonder if somebody else is active here, but I want to create a trigger for code strings, which can be stored and used in the same map.

example:
-code BW Z4Z
-code BWX nT6

I'll appreciate your help in advance if you are willing ☺
 
Level 24
Joined
Jun 26, 2020
Messages
1,853
yeah
store the codes and use them
As I said, is easy, you don't need to save them, just create a trigger for each one (Unless you are not using GUI):
  • Code
    • Events
      • Player - Player 1 (Red) types a chat message containing - as A substring
      • Player - Player 2 (Blue) types a chat message containing - as A substring
      • Player - Player 3 (Teal) types a chat message containing - as A substring
      • Player - Player 4 (Purple) types a chat message containing - as A substring
      • Player - Player 5 (Yellow) types a chat message containing - as A substring
      • Player - ...
    • Conditions
      • (Substring((Entered chat string), 1, 6)) Equal to -code // This has a space at the end
      • (Substring((Entered chat string), 7, (Length of (Entered chat string)))) Equal to <Your code>
    • Actions
      • -------- Do actions --------
 
Level 2
Joined
Sep 16, 2016
Messages
21
As I said, is easy, you don't need to save them, just create a trigger for each one (Unless you are not using GUI):
  • Code
    • Events
      • Player - Player 1 (Red) types a chat message containing - as A substring
      • Player - Player 2 (Blue) types a chat message containing - as A substring
      • Player - Player 3 (Teal) types a chat message containing - as A substring
      • Player - Player 4 (Purple) types a chat message containing - as A substring
      • Player - Player 5 (Yellow) types a chat message containing - as A substring
      • Player - ...
    • Conditions
      • (Substring((Entered chat string), 1, 6)) Equal to -code // This has a space at the end
      • (Substring((Entered chat string), 7, (Length of (Entered chat string)))) Equal to <Your code>
    • Actions
      • -------- Do actions --------
incredibly this works 😄
I hope that there's a way to store the code for the use while playing on the same map next time
 
Last edited:
incredibly this works 😄
I hope that there's a way to store the code for the use while playing on the same map next time
There are 2 ways:
  • either the player have to get the code and "remember it" until next play session and enter it again to load
  • or you save it locally on the players computer and load it (if it exists) on map start.
Either way, you need to setup what needs to be saved and how to load it.
 
Level 24
Joined
Jun 26, 2020
Messages
1,853
incredibly this works 😄
I hope that there's a way to store the code for the use while playing on the same map next time
That is what did you want? I asked if you wanted "Store specific codes to use? or an Encoder and Decoder?" and you told me the first option instead of the second, because in that case I also would recommend you that Codeless Save and Load system.
 
Level 2
Joined
Sep 16, 2016
Messages
21
sorry for late reply
if somebody else can teach me how to save the string (example: Z4e) and load it in the same map for another time by using this Save & Load trigger?
thanks in advance
 
Top