# HG changeset patch
# User almikes@aol.com
# Date 1419136928 0
# Node ID f33a741d90579a17d554694795b359b3b99a18e3
# Parent 8b7a9c0327224bac5553b917f45d86608cfa81f4
Update HogSay for 0.9.21
diff -r 8b7a9c032722 -r f33a741d9057 LuaAPI.wiki
--- 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 @@
gear = AddGear(...)
FindPlace(gear, true, 0, LAND_WIDTH) -- places the gear randomly between 0 and LAND_WIDTH
-=== !HogSay(gearUid, text, manner) ===
-Makes the specified gear say, think, or shout some text in a bubble.
+=== !HogSay(gearUid, text, manner [,vgState]) ===
+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) ||
- 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
-
+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.
If the gear is a hedgehog, and it’s another team’s turn, the bubble is drawn translucent.
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:
+
+HogSay(CurrentHedgehog, "I wonder what to do …", SAY_THINK) -- thought bubble with text “I wonder what to do …”
+HogSay(CurrentHedgehog, "I'm hungry.", SAY_SAY) -- speech bubble with text “I’m hungry.”
+HogSay(CurrentHedgehog, "I smell CAKE!", SAY_SHOUT) -- exclamatory bubble with text “I smell CAKE!”
=== !HogTurnLeft(gearUid, boolean) ===
Faces the specified hog left or right.