LuaAPI.wiki
changeset 533 f33a741d9057
parent 519 b757c990bd5c
child 535 5cb76f048bd9
--- a/LuaAPI.wiki	Sun Dec 21 02:03:09 2014 +0000
+++ b/LuaAPI.wiki	Sun Dec 21 04:42:08 2014 +0000
@@ -559,15 +559,28 @@
 
 <code language="lua">    gear = AddGear(...)
     FindPlace(gear, true, 0, LAND_WIDTH) -- places the gear randomly between 0 and LAND_WIDTH</code>
-=== <tt>!HogSay(gearUid, text, manner)</tt> ===
-Makes the specified gear say, think, or shout some text in a bubble.
+=== <tt>!HogSay(gearUid, text, manner [,vgState])</tt> ===
+Makes the specified gear say, think, or shout some text in a comic-style speech or thought bubble. In 0.9.21 `gearUid` is _not_ limited to hedgehogs, altough the function name suggests otherwise.
+
+The `manner` parameter specifies the type of the bubble and can have one of these values:
 
-Example:
+|| *Value of `manner`* || *Looks* ||
+|| `SAY_THINK` || Thought bubble ||
+|| `SAY_SAY` || Speech bubble ||
+|| `SAY_SHOUT` || Exclamatory bubble (denotes shouting) ||
 
-<code language="lua">    HogSay(CurrentHedgehog, "I wonder what to do...", SAY_THINK) -- thought bubble with text
-    HogSay(CurrentHedgehog, "I'm hungry...", SAY_SAY) -- speech bubble with text
-    HogSay(CurrentHedgehog, "I smell CAKE!", SAY_SHOUT) -- exclamatory bubble with text
-</code>
+As of 0.9.21, there is a optional 4th parameter `vgState`, it defines wheather the speechbubble is drawn fully opaque or semi-transparent. The value `0` is the default value.
+
+|| *Value of `vgState`* || *Effect* ||
+|| `0` || If the specified gear is a hedgehog, and it’s the turn of the hedgehog’s team, the bubble is drawn fully opaque.<br>If the gear is a hedgehog, and it’s another team’s turn, the bubble is drawn translucent.<br>If the gear is not a hedgehog, the bubble is drawn fully opaque. ||
+|| `1` || The bubble is drawn translucent. ||
+|| `2` || The bubble is drawn fully opaque. ||
+
+Examples:
+
+<code language="lua">HogSay(CurrentHedgehog, "I wonder what to do …", SAY_THINK) -- thought bubble with text “I wonder what to do …”</code>
+<code language="lua">HogSay(CurrentHedgehog, "I'm hungry.", SAY_SAY) -- speech bubble with text “I’m hungry.”</code>
+<code language="lua">HogSay(CurrentHedgehog, "I smell CAKE!", SAY_SHOUT) -- exclamatory bubble with text “I smell CAKE!”</code>
 === <tt>!HogTurnLeft(gearUid, boolean)</tt> ===
 Faces the specified hog left or right.