- Joined
- Feb 2, 2006
- Messages
- 1,629
Hi,
I have this function defined in a custom common.ai:
The chat message ingame will always show "I will build expansions!".
Why does the I2S not work in AI scripts?
The number of expansions can be sent as AI data from some GUI trigger. Is my only chance to show the correct number by moving the chat message to the GUI trigger instead of the AI script.
I am also not sure where the message goes with DisplayText?
I have this function defined in a custom common.ai:
JASS:
function NotifyOtherPlayers takes string message returns nothing
call BlzDisplayChatMessage(Player(GetAiPlayer()), 0, message)
call DisplayText(GetAiPlayer(), message)
endfunction
...
set expansions = GetLastData()
call NotifyOtherPlayers("I will build " + I2S(expansions) + " expansions!")
The chat message ingame will always show "I will build expansions!".
Why does the I2S not work in AI scripts?
The number of expansions can be sent as AI data from some GUI trigger. Is my only chance to show the correct number by moving the chat message to the GUI trigger instead of the AI script.
I am also not sure where the message goes with DisplayText?