User Tools

Site Tools


4rpl:commands:setobjtext

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
4rpl:commands:setobjtext [2021/01/08 16:01] – external edit 127.0.0.14rpl:commands:setobjtext [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 6: Line 6:
  
 ===== Description ===== ===== Description =====
-Sets text of a unit's object. Objects are the sub-parts that make up a unit. +Sets text of a unit's object. Objects are the sub-parts that make up a unit.\\ 
-When text is set on an object it will show an in-game text field on the object. By default the text will billboard, that is to say it will always face the camera.+When text is set on an object it will show an in-game text field on the object. By default the text will billboard, that is to say it will always face the camera.\\
 To remove text from an object set the text to empty string (""). To remove text from an object set the text to empty string ("").
 +
 +This API and [[SetUnitDebugText]] have access to all compatible formats in CW4. If you plan to resize the text, you will need to use the format "<color #8BDFFF><line-height=[Insert number]></color>" after resizing as the changed size of text will not scale it's line-height correctly without intervention. Typically; "<color #8BDFFF><size=[SOME NUMBER]><line-height=100%></color>" solves this problem entirely. Unlike [[SetUnitDebugText]] however, the line width is not limited and without intervention, the entire String will be displayed as a single line of text. To fix this, be sure to limit the line-width by adding "<color #8BDFFF><br></color>" to create new lines or limit the left line-margin using "<color #8BDFFF><margin-right=[Insert number]></color>".\\
 +The full list of formats in CW4 can be found in the [[cw4:a.d.a_syntax_syntax_guide|A.D.A. Message editor format]] guide.
  
 ===== Examples ===== ===== Examples =====
4rpl/commands/setobjtext.1610121708.txt.gz · Last modified: 2025/02/14 14:56 (external edit)