# HG changeset patch # User Wuzzy # Date 1543883074 0 # Node ID c22e796992aaf655ceaf614c21c594b0d6129a63 # Parent 77f8cfe4ee8d0bc04edeb4ff9770093b617cbc36 LuaAPI: Add capcol constants diff -r 77f8cfe4ee8d -r c22e796992aa LuaAPI.wiki --- a/LuaAPI.wiki Tue Dec 04 00:18:58 2018 +0000 +++ b/LuaAPI.wiki Tue Dec 04 00:24:34 2018 +0000 @@ -93,6 +93,9 @@ || `TotalRounds` || Number of rounds that have passed. Equals `-1` if game has not started yet or hogs are still being placed. This variable is buggy in 0.9.23 and earlier! || || `CurrentHedgehog` || The hedgehog gear that is currently in play || || `AmmoTypeMax` || Maximum ammo type ID (useful to iterate through all ammo types, starting by 0) || +|| `MAX_HOG_HEALTH` || Maximum possible hedgehog health || +|| `MAX_TURN_TIME` || Maximum possible turn time in milliseconds || +|| `INTERFACE` || Type of the game interface: "desktop" for desktop, "touch" for touchscreen || === !GameFlags === The !GameFlags are used to store simple boolean settings of the game. @@ -1083,6 +1086,7 @@ || `EXPLDoNotTouchHH` || Do not push hedgehogs || || `EXPLDoNotTouchAny` || Do not push any gears || || `EXPLDontDraw` || Do not destroy land || +|| `EXPLForceDraw` || Destroy land, even if `gfSolidLand` is active || || `EXPLNoGfx` || Do not show an explosion animation and do not shake the screen || || `EXPLPoisoned` || Poison all hedgehogs in explosion radius || @@ -1424,7 +1428,7 @@ === !AddCaption(text, color, captiongroup) === -Display an event text in the upper part of the screen with the specified RGBA [LuaAPI#Color color] and caption group. Although an RBGA color is used, Hedgewars does not actually support transparent or semi-transparent captions, so the fourth byte is ignored. We recommend you to always specify a full opacity (`FF` in hexadecimal) for the caption. +Display an event text in the upper part of the screen with the specified RGBA text [LuaAPI#Color color] and caption group. Although an RBGA color is used, Hedgewars does not actually support transparent or semi-transparent captions, so the fourth byte is ignored. We recommend you to always specify a full opacity (`FF` in hexadecimal) for the caption. || *`captiongroup`* || *Meaning* || || `capgrpGameState` || Used for important global game events, like Sudden Death || @@ -1434,6 +1438,12 @@ || `capgrpMessage2` || Generic message || || `capgrpAmmostate` || Used to show information about weapon state, i.e. bounce level, timer, remaining shots, etc. || +The color can be specified in RGBA format, but you can (but don't have to) use one of the following built-in text color. + +|| *Built-in color* || *Meaning* || +|| `capcolDefault` || Default caption color || +|| `capcolSetting` || Notification related to a local client setting (audio volume, auto camera on/off) || + Example: AddCaption("Melon bomb rain in 2 rounds!", 0xFF0000FF, capgrpGameState)