• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

[Lua] Extracting Observer text

Status
Not open for further replies.
Level 1
Joined
Jun 21, 2019
Messages
4
Trying to extract chat messages from Observers to run simple trigger that doesn`t need sync.

What already tried:
Lua:
TriggerRegisterPlayerEvent(trig, Player(0), EVENT_PLAYER_CHAT)
does work but returns nothing (no text, no player). Figuring out triggering player is simple but text is beyond me.
Tried to get text from chat text frame but nor chat nor it`s children don`t ever return any text.
Is there any working way?
 
Last edited:
Level 19
Joined
Jan 1, 2018
Messages
739
Have you tried using TriggerRegisterPlayerChatEvent and GetEventPlayerChatString?
JASS:
native TriggerRegisterPlayerChatEvent takes trigger whichTrigger, player whichPlayer, string chatMessageToDetect, boolean exactMatchOnly returns event
constant native GetEventPlayerChatString takes nothing returns string
 
Status
Not open for further replies.
Top