Hi Im using A6
Ive made an enemy script that registers an ID to it and applied it to three characters.
ACTION enemy_dummy
{
entity_handle[entity_count] = handle(me);
entity_count += 1;
}
I then call them out from the player action using:
function where_are_ya()
{
you = ptr_for_handle(entity_handle[0]);
a = vec_dist(you.x,my.x);
you = ptr_for_handle(entity_handle[1]);
b = vec_dist(you.x,my.x);
you = ptr_for_handle(entity_handle[2]);
c = vec_dist(you.x,my.x);
}
This works but Im not sure how exactly. I am wondering how does each enemy script know which one was first when they are all the same? If you see what I mean, this would clear alot up for me.
Also dumb question but when using skills. I still do not know whether if I define one skill then every entity can use this with their own value matched to it?
So
DEFINE health, skill99;
can be used by everyone but it changes depending on who calls it? If something was already defined to skill99 would the above overwrite it?
Any help would be greatly appreciated
Thanks
EDIT: Ok I just figured out that the enemy ID preference comes from the order they were placed in the level.
Last edited by TigerTao; 06/09/08 21:25.