Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 14,540 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
enemy scripts and the use of skills #210330
06/09/08 21:13
06/09/08 21:13
Joined: May 2006
Posts: 90
England
TigerTao Offline OP
Junior Member
TigerTao  Offline OP
Junior Member

Joined: May 2006
Posts: 90
England
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.
Re: enemy scripts and the use of skills [Re: TigerTao] #210359
06/10/08 01:52
06/10/08 01:52
Joined: Nov 2007
Posts: 3
G
General_Hate Offline
Guest
General_Hate  Offline
Guest
G

Joined: Nov 2007
Posts: 3
I am not sure if the order of the entities stored in entity_handle[] conforms to the order these entities they are placed into the level...

In fact it depends on the order the "individual" actions applied to each entity are executed. But if this order conforms to the placing one, then you´re absolutely right.


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1