Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,203 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 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 | chip programmers | 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