Friday, 22 May 2020

Functions from "Animation" and "Script" modules in Far Cry




 Attention! It is not info about my project, it's a backup of my article from Moddb!

This tutorial is for those who are a bit versed in scripts. At the end of this tutorial, there are examples of writing functions. This is for those who have not used them before. - IDL

Functions from "Animation" module.
Functions:
1.      Animation:ClearDecals();
2.      Animation:DumpAnims();
3.      Animation:DumpDecals();
4.      Animation:DumpModels();
5.      Animation:DumpStates();
6.      Animation:TrashAnims();
As you can see, this functions they don 't require arguments. These fuctions using for debugs.
Functions from "Script" module.
Functions:
1.      Script:ReloadScript(path);
2.      Script:LoadScript(path,reload);
Arguments:
1.      path - path to script.
2.      path - path to script, reload (optional) - should the script be reloaded if it already is loaded? Set 1 if you want to reload.
Examples.
1.      Animation:ClearDecals();
2.      Animation:DumpAnims();
3.      Animation:DumpDecals();
4.      Animation:DumpModels();
5.      Animation:DumpStates();
6.      Animation:TrashAnims();
7.      Script:ReloadScript("scripts/common.lua"); - reload given script.
8.      Script:LoadScript("scripts/materials/commoneffects.lua",1); - load the given script and after loading reload it.

Use this functions in LUA scripts. Have fun with coding!
Author of this tutorial - IDL
Also sorry, if my English is bad.

No comments:

Post a Comment