[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:
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.
Back
Top