User Tools

Site Tools


set_entity_tooltip

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
set_entity_tooltip [2020/04/28 09:46] justinset_entity_tooltip [2021/04/21 18:51] (current) justin
Line 12: Line 12:
 |entity|[[Entity]] to change the tooltip for.|[[Entity]]|Yes| |entity|[[Entity]] to change the tooltip for.|[[Entity]]|Yes|
 |tooltip_text|Text to display in the tooltip.|[[String]]|Yes| |tooltip_text|Text to display in the tooltip.|[[String]]|Yes|
 +
 +<WRAP center round info 100%>
 +You can use [[placeholder expression|placeholder expressions]] within the tooltip text, for example to update an [[entity|entity's]] tooltip based on the current value of a stat or custom property of that [[entity]].
 +</WRAP>
  
 ====Example:==== ====Example:====
 <code bauxite> <code bauxite>
-set_entity_tooltip(self, "Wooden Chest")+set_entity_tooltip(self, "Wooden Chest");
 </code> </code>
-//Results:// The tooltip text for the [[entity]] that triggered this script will be changed to "Wooden Chest".+//Results:// The tooltip text for the [[entity]] that triggered this [[script]] will be changed to "Wooden Chest".
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
set_entity_tooltip.1588092375.txt.gz · Last modified: 2020/04/28 09:46 by justin