This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
4rpl:commands:setunitdebugtext [2021/02/08 13:14] – Link to debugging Karsten75 | 4rpl:commands:setunitdebugtext [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
====== SetUnitDebugText ====== | ====== SetUnitDebugText ====== | ||
- | SetUnitDebugText(< | + | SetUnitDebugText(< |
===== Description ===== | ===== Description ===== | ||
- | Sets the debug text that appears | + | Sets a text to appear |
+ | This text can be used instead of, or in conjunction with [[SetObjText]] to display some text above a unit. It is directly attached to the unit and cannot be re-positioned. Although being labeled as " | ||
+ | Both this API and [[SetObjText]] have access to all compatible formats in CW4. If you plan to resize the text, you will need to use the format "< | ||
+ | The full list of formats in CW4 can be found in the [[cw4: | ||
+ | |||
+ | The text displayed by SetUnitDebugText is cleared upon game reload. If needed, it is recommended to re-apply the text display inside the [[func_awake|: | ||
===== Examples ===== | ===== Examples ===== | ||
<code 4rpl> | <code 4rpl> | ||
- | SetUnitDebugText(self "Debug statement") | + | SetUnitDebugText(Self "text goes here") |
</ | </ | ||