LuaLibraries.wiki
changeset 1053 bb4cfa5b41a0
parent 939 39ed0b23ef49
child 1234 60346a2ffb4c
equal deleted inserted replaced
1052:1c45c17f118a 1053:bb4cfa5b41a0
   160 end</code>
   160 end</code>
   161 
   161 
   162 Also, `AnimInit()` needs to be called in `onGameInit()`.
   162 Also, `AnimInit()` needs to be called in `onGameInit()`.
   163 Each of these functions will be explained below.
   163 Each of these functions will be explained below.
   164 
   164 
   165 Note: The Animate library will direclty overwrite the input mask with `SetInputMask`. If you already use this function in your script, it might lead to conflicts.
   165 Note: The Animate library will direclty overwrite the input mask with `SetInputMask`. If you already use this function in your script, it might lead to conflicts. Use `AnimSetInputMask` to set the input mask in a manner that is compatible with the Animate library.
   166 
   166 
   167 === Cinematic handling ===
   167 === Cinematic handling ===
   168 
   168 
   169 ==== `ShowAnimation()` ====
   169 ==== `ShowAnimation()` ====
   170 Performs the current action in the cinematic and returns `true` if finished, otherwise `false`. It needs to be used in `onGameTick`. Cut-scenes need to be added with `AddAnim(steps)`.
   170 Performs the current action in the cinematic and returns `true` if finished, otherwise `false`. It needs to be used in `onGameTick`. Cut-scenes need to be added with `AddAnim(steps)`.
   349 RemoveEventFunc(condFunc2, condArgs1) --Removes a single event</code>
   349 RemoveEventFunc(condFunc2, condArgs1) --Removes a single event</code>
   350 
   350 
   351 ==== `CheckEvents` ====
   351 ==== `CheckEvents` ====
   352 Verifies all the condition functions in the events list and calls the respective ‘action’ functions if the conditions are met. If the `evType` of a completed event equals `0` then it is removed from the list. This function is best placed in `onGameTick`.
   352 Verifies all the condition functions in the events list and calls the respective ‘action’ functions if the conditions are met. If the `evType` of a completed event equals `0` then it is removed from the list. This function is best placed in `onGameTick`.
   353 
   353 
       
   354 ==== `AnimSetInputMask(inputMask)` (0.9.23) ====
       
   355 Call this function instead of `SetInputMask` if you want to set the input mask in a way that does not conflict with the Animate library.
       
   356 
       
   357 Internally, the input mask you provide is simply AND-ed with the input mask used by the Animate library. Otherwise, this function works lik `SetInputMask`.
       
   358 
       
   359 If you call `SetInputMask` directly, note that it might get quickly overwritten by the Animatel library!
   354 
   360 
   355 == Params ==
   361 == Params ==
   356 The Params library is a small library introduced in 0.9.21. It provides a function to parse the parameter string `ScriptParam` and it is intended to simplify using this string.
   362 The Params library is a small library introduced in 0.9.21. It provides a function to parse the parameter string `ScriptParam` and it is intended to simplify using this string.
   357 
   363 
   358 This library requires the parameter string to be in a certain format. It must be a comma-seperated list of kev-value pairs in the `key=value` format. Examples:
   364 This library requires the parameter string to be in a certain format. It must be a comma-seperated list of kev-value pairs in the `key=value` format. Examples: