LuaLibraryAchievements.wiki
changeset 1488 a955f982d72a
parent 1487 1800c3c11a33
equal deleted inserted replaced
1487:1800c3c11a33 1488:a955f982d72a
     8 An achievement in Hedgewars is a simple award given for doing something awesome or difficult in a mission, or winning a mission in a great way.
     8 An achievement in Hedgewars is a simple award given for doing something awesome or difficult in a mission, or winning a mission in a great way.
     9 Achievements are a hidden feature in Hedgewars so far and far from complete.
     9 Achievements are a hidden feature in Hedgewars so far and far from complete.
    10 
    10 
    11 One existing achievement in Hedgewars is “Lively Lifeguard” in the scenario “That Sinking Feeling” which is awarded for rescuing all hogs.
    11 One existing achievement in Hedgewars is “Lively Lifeguard” in the scenario “That Sinking Feeling” which is awarded for rescuing all hogs.
    12 
    12 
    13 == `awardAchievement(name, statText, capgrp)` ==
    13 == `awardAchievement(name, statMessage, capgrp)` ==
    14 Awards an achievement with name `name` to player.
    14 Awards an achievement with name `name` to player.
    15 
    15 
    16 Currently, this only displays a caption and adds a mention in the stat screen.
    16 Currently, this only displays a caption and adds a mention in the stat screen.
    17 
    17 
    18 Parameters:
    18 Parameters:
    19 
    19 
    20  * `name`: Name of achievement.
    20  * `name`: Name of achievement.
    21  * `statText`: Optional. If set as string, this text will be shown in the stats screen. If `nil`, a default text is used.
    21  * `statMessage`: Optional. If set as string, this text will be shown in the stats screen. If `nil`, a default text is used.
    22  * `capgrp`: Optional. Caption group of `AddCaption` to be used. Default is `capgrpMessage2`. If `false`, no caption is shown.
    22  * `capgrp`: Optional. Caption group of `AddCaption` to be used. Default is `capgrpMessage2`. If `false`, no caption is shown.
    23 
    23 
    24 For consistent style, treat the name like a title is written in the English language. Good: “Naughty Ninja”. Bad: “naughty ninja”.
    24 For consistent style, treat the name like a title is written in the English language. Good: “Naughty Ninja”. Bad: “naughty ninja”.