Other WCIII In-game command line

Never_Quit

New Member
Reaction score
16
Is it possible to create a trigger that will run user input code using substrings?

Ex:
Trigger:
  • Command Line
    • Events
      • Player - Player 1 (Red) types a chat message containing ~ as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 1)) Equal to ~
    • Actions
      • Set code = (Substring((Entered chat string), 2, (Length of (Entered chat string))))
      • Custom script: udg_code


I think id be pretty cool :)
 

tooltiperror

Super Moderator
Reaction score
231
Yeah, this should be put it World Editor Help with a [Discussion] tag in the front. It's an interesting idea, although it would of course be better in JASS because you could creating a parsing interface. Or use this.
 

Azlier

Old World Ghost
Reaction score
461
The 'Custom Script' thing doesn't take a string. It takes a line of Jass, so you'll need some crazy parser thingy instead to try to treat a string as Jass as suggested above.
 

Zack1996

Working on a Map
Reaction score
68
You can try using ExecuteFunc()

call ExecuteFunc(udg_code)

Of course, the function must take nothing, else it will not work.

It crashes the game if an invalid function is stated, though.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top