API GetActiveMissionInfo

From Vendetta Lua
Revision as of 04:42, 18 January 2011 by Draugath (talk | contribs) (→‎GetActiveMissionInfo)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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:
<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>
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