skill1 ... skill100
General-purpose entity variables for storing parameters, just like local variables. The first 20 entity skills can be set in WED's entity properties panel; their meaning depends on the entities' action. Each three consecutive entity skills can be used together as a vector, which is given by giving the first of the three skills. Skills can be renamed by #define statements for assigning meanginful names to WED's entity properties panel.
Range:
-999999.999 .. +999999.999 (default:0)
Type:
var
Remarks:
- skill1..skill20 are used for entering default properties in WED.
- skill21..skill40 were used by the A6 template scripts, and are otherwise free for the user.
- skill41..skill50
are used for shaders.
- skill61..skill70
are used for storing internal data by the template scripts and the script libraries.
- skill71..skill80
are used for data exchange between template script functions, f.i. for input parameters.
- skill81..skill100
are reserved for future extensions.
- Skills can be used for storing object pointers when using a cast operator (f.i. (STRING*), see example). The cast operator is required for functions that expect a pointer, otherwise a pointer to the skill, and not the skill itself would be passed to the function. Note that pointers become invalid on game_load.
-
Skills can also be accessed through an array index from 0 to 99, f.i. my.skill1 == my.skill[0].
Examples:
vec_set(my.skill1, my.pan); // sets skill1..skill3
my.tilt = my.skill2;
...
define health,skill10;
#define health skill10
my.health = 99;
...
my.skill40 = str_create(""); // use skill for storing a string pointer
str_for_id((STRING*)my.skill40,my.client_id);
See also:
FLAG1...FLAG8, Entity Properties, send_skill
► latest version online