I would like to Reference the information of a given unit but i am having a problem linking it together in a trigger. what i have so far (that isn't working for some reason, lol)
Events Game - Map initialization Local Variables Conditions Actions Data Table - Save (Value of Units InfestedAbomination Description for player Any Player) as "Aberration" in the Global data table
Since the Description is already made on the unit in the data, i would like to grab that info and use it to display in a trigger.
This doesn't seem to work at all, XD
Events Game - Player Any Player types a chat message containing "", matching Partially Actions General - If (Conditions) then do (Actions) else do (Actions) If (Triggering player) == 1 (Entered chat string) == "Aberration" Then UI - Display ("Aberration" from the Global data table) for Ind.Player.Group to Debug area UI - Display "abc" for Ind.Player.Group to Debug area <---this will display "abc" so i know the triggering is firing and is for that player. Else
This however ""UI - Display ("Aberration" from the Global data table) for Ind.Player.Group to Debug area"" isn't working.
I am guessing the initial problem was that you were saving a string to the data table then trying to read it as text. You either need to save it as text or load it from the data table as a string and then convert it to text (which is what your second solution does I am guessing). Be aware that some description information is editor only so has no catalog links.
-My only other question, is there a shorter way of doing this? It does work by displaying the info from the Data Description but do i need to do the extra steps to put it into a variable?
You do not need the variable, only to make sure that you load from the data table the same type as you save. All UI elements take text types while catalog lookups return strings. You will need to convert the string to text before it can be displayed.
Text is localized so potentially different between clients. Strings are used internally by the game engine so are the same between all clients. You cannot convert from text to string but can convert from string to text.