Difference between revisions of "API GetActiveMissionInfo"
From Vendetta Lua
(split) |
(→GetActiveMissionInfo) |
||
Line 1: | Line 1: | ||
=== GetActiveMissionInfo === | === GetActiveMissionInfo === | ||
'''Definition:'''<br> | '''Definition:'''<br> | ||
− | GetActiveMissionInfo(int num) -> string mname table mmsg int itemid | + | GetActiveMissionInfo(int num) -> string mname table mmsg int itemid table mobj |
<br> | <br> | ||
'''Description:'''<br> | '''Description:'''<br> | ||
Line 12: | Line 12: | ||
''mname'' string containing name of active mission<br> | ''mname'' string containing name of active mission<br> | ||
''mmsg'' array where each index contains a mission log entry + optional interface elements and their properties<br> | ''mmsg'' array where each index contains a mission log entry + optional interface elements and their properties<br> | ||
− | ''itemid'' itemid of the mission | + | ''itemid'' itemid of the mission<br> |
+ | ''mobj'' array where each index contains a mission objective | ||
<br> | <br> | ||
'''Example:'''<br> | '''Example:'''<br> | ||
− | <source lang="lua">GetActiveMissionInfo(1) -> "awesome mission" {1={"awesome mission question" 2={0="button" 1="awesome button text" action=1}}} 1234</source><br> | + | <source lang="lua">GetActiveMissionInfo(1) -> "awesome mission" {1={"awesome mission question" 2={0="button" 1="awesome button text" action=1}}} 1234 \ |
+ | {1={"objective 1"}, 2={"objective 2"}, ... , n={"objective n"}}</source><br> | ||
The active mission is called "awesome mission" and the first mission log entry contains the text "awesome mission question" with a button labaled "awesome button text" which triggers the action 1. item id for this mission is 1234 | The active mission is called "awesome mission" and the first mission log entry contains the text "awesome mission question" with a button labaled "awesome button text" which triggers the action 1. item id for this mission is 1234 | ||
<br> | <br> |
Latest revision as of 04:42, 18 January 2011
GetActiveMissionInfo
Definition:
GetActiveMissionInfo(int num) -> string mname table mmsg int itemid table mobj
Description:
Get information about the selcted active mission
Arguments:
num index of active mission (always 1)
Returns:
mname string containing name of active mission
mmsg array where each index contains a mission log entry + optional interface elements and their properties
itemid itemid of the mission
mobj array where each index contains a mission objective
Example:
GetActiveMissionInfo(1) -> "awesome mission" {1={"awesome mission question" 2={0="button" 1="awesome button text" action=1}}} 1234 \ {1={"objective 1"}, 2={"objective 2"}, ... , n={"objective n"}}
The active mission is called "awesome mission" and the first mission log entry contains the text "awesome mission question" with a button labaled "awesome button text" which triggers the action 1. item id for this mission is 1234