# HG changeset patch # User Wuzzy # Date 1685019911 0 # Node ID 09bf7a4d5411eb2b4d64b6d52f56504943184ad2 # Parent f00c578955f7e4cfc525e567811118a4ee0f400a LuaGameplay: remove version numbers diff -r f00c578955f7 -r 09bf7a4d5411 LuaGameplay.wiki --- a/LuaGameplay.wiki Thu May 25 13:04:05 2023 +0000 +++ b/LuaGameplay.wiki Thu May 25 13:05:11 2023 +0000 @@ -31,7 +31,7 @@ Normally, a “Coward” taunt may be played and an announcer message may be shown (depending on the situation). Set the optional `noTaunts` parameter to `true` to force the engine to never play a taunt or show a message. `noTaunts` is `false` by default. -=== Retreat(time [, respectGetAwayTimeFactor) (0.9.25) === +=== Retreat(time [, respectGetAwayTimeFactor) === Forces the current turn into the retreating phase, as if the hog made an attack. That is, the current hedgehog is unable to attack or select a weapon, only movement is possible until the retreat time is up. The retreat time must be set with `time` in milliseconds. By default, this time is automatically multiplied with get-away time percentage from the game scheme for seamless integration with schemes. If you want to ignore the game scheme for some reason and set the retreat time no matter what, set `respectGetAwayTimeFactor` to `false`. @@ -40,16 +40,16 @@ Note: If you want the turn to end instantly, it is recommended to use `EndTurn` instead. -=== !SetTurnTimeLeft(newTurnTimeLeft) (0.9.25) === +=== !SetTurnTimeLeft(newTurnTimeLeft) === Set the remaining turn time in milliseconds. The current remaining turn time can be read from the variable `TurnTimeLeft`. -=== !SetReadyTimeLeft(newReadyTimeLeft) (0.9.25) === +=== !SetReadyTimeLeft(newReadyTimeLeft) === Set the remaining ready time in milliseconds. This function should only be called in onNewTurn. The current remaining ready time can be read from the variable `ReadyTimeLeft`. -=== !SetTurnTimePaused(isPaused) (1.0.0) === +=== !SetTurnTimePaused(isPaused) === Pauses the turn time indefinitely if `isPaused` is set to `true`, disabled the turn time pause if `isPaused` is set to `false`. -=== !GetTurnTimePaused() (1.0.0) === +=== !GetTurnTimePaused() === Returns `true` if the turn time is currently paused by `SetTurnTimePaused`, otherwise returns `false`. === !EndGame() === @@ -188,7 +188,7 @@ === !GetAmmoName(ammoType [, ignoreOverwrite ]) === Returns the localized name for the specified `ammoType`, taking an ammo name overwritten by `SetAmmoTexts` into account. If `ignoreOverwrite` is `true`, this function will always return the original ammo name of the weapon and ignores names which may have been overwritten by `SetAmmoTexts`. -=== !SetAmmoSlot(ammoType, slot) (1.0.0) === +=== !SetAmmoSlot(ammoType, slot) === Sets the slot number of `ammoType` to the given `slot` (counting starts from 1). Use with care! It is your responsibility that each ammo slot does not hold more weapons than the maximum ammo menu width, otherwise, crashes are possible. Test with a full ammo menu to be sure. @@ -339,16 +339,16 @@ === !SetVampiric(bool) === Toggles vampirism mode for this turn. Set `bool` to `true` to enable (same effect as if the hedgehog has used Vampirism), `false` to disable. -=== !GetVampiric() (0.9.25) === +=== !GetVampiric() === Returns true if vampirism mode is currently active. === !SetLaserSight(bool) === Toggles laser sight for this turn. Set `bool` to `true` to enable (same effect as if the hedgehog has used Laser Sight), `false` to disable. -=== !GetLaserSight() (0.9.25) === +=== !GetLaserSight() === Returns true if laser sight (as utility) is currently active. The sniper rifle's built-in laser sight does not count. -=== !EnableSwitchHog() (0.9.25) === +=== !EnableSwitchHog() === Enable hog switching mode for the current hedgehog. This function should be called while the hedgehog is standing on solid ground (`GetFlightTime` returns 0). Internally, this tries to spawn a `gtSwitcher` gear which, as long it exists, handles the hog switching. You can delete this gear to stop the hog switching prematurely. If there already is a `gtSwitcher` gear, no additional gear is spawned. @@ -405,7 +405,7 @@ --[[ Adds a new team with name “team 1”, the first default color (usually red), the grave “Simple”, the fort “Tank” the voicepack “Default” (in the appropriate language version) and the flag “hedgewars”. ]] -=== !AddMissionTeam(color) (1.0.0) === +=== !AddMissionTeam(color) === Adds a new team using the player-chosen team identity when playing a singleplayer mission. Does not work in multiplayer. This function is very similar to `AddTeam`. Team settings like team name and flag will be taken from the player-chosen team. @@ -442,7 +442,7 @@ Use this to display a score, power value or another important team attribute. There's no hard length limit, but please try to keep it as short as possible to avoid visual clutter. -=== SetTeamPassive(teamname, isPassive) (1.0.0) === +=== SetTeamPassive(teamname, isPassive) === Mark a team as passive if `isPassive` is `true`. Passive teams do not participate in the game and are treated like frozen teams. When determining the team order, passive teams are completely ignored. === !GetClanColor(clan) === @@ -462,10 +462,10 @@ === !GetCampaignVar(varname) === Returns the value of the campaign variable `varname` as a string. See also `SaveCampaignVar`. -=== !SaveMissionVar(varname, value) (1.0.0) === +=== !SaveMissionVar(varname, value) === Stores the value `value` (a string) into the mission variable `varname` (also a string). A mission variable is like a campaign variable, but it applies for singleplayer missions only (Training/Challenge/Scenario), excluding campaign missions. -=== !GetMissionVar(varname) (1.0.0) === +=== !GetMissionVar(varname) === Returns the value of the mission variable `varname` as a string. See also `SaveMissionVar`. == Randomness ==