• 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] Prefixes for Chat Commands

Status
Not open for further replies.
Level 9
Joined
Oct 20, 2010
Messages
228
I am unsure if anyone remembers such maps as SotDRP or the like, but I am currently trying to recreate some features for my own personal use on a map with a friend. I preface this with that I am new to coding although I understand most of the logic that goes into it. My only problem is actually finding the things in the GUI menus.

I will likely have more questions if anyone wishes to help me more in-depth on chat messages but I will just start with this question.

How do I make an event recognizing a prefix? such as a "." so when I type ".hello" it will post hello as a floating text.
 
Level 11
Joined
Dec 11, 2009
Messages
234
  • Events
    • Player - Player 1 (Red) types a chat message containing . as A substring
upd:
  • example
    • Events
      • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 1)) Equal to .
    • Actions
      • Set str = (Substring((Entered chat string), 2, (Length of (Entered chat string))))
      • Floating Text - Create floating text that reads str above Ghoul 0006 <gen> with Z offset 16.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
 
Last edited:
Status
Not open for further replies.
Top