Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 04/03/26 16:57
TMFs on options in live trading
by Spirit. 03/26/26 19:52
TDAmeritrade plugin with new Schwab accountt?
by AndrewAMD. 03/24/26 17:11
Black Book, 4th edition
by jcl. 03/17/26 09:28
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 3,821 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
ondrej, mredit, vestriaa, Lukudo, mldenoiser
19205 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: [ANet] enemy [Re: MasterQ32] #408394
09/30/12 15:32
09/30/12 15:32
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Code:
you=players[enet_ent_creator(enet_ent_globpointer(players[cl_id]))];



I assume that players[] is an array where the local pointer of each player is stored. The index is the client id of the player.

If my assumption is correct, it should be like this (code snippet running in the enemies function):

Code:
// get the pointer to the player
you = players[enet_get_clientid()];
// calc distance between enemy and player
distance = vec_dist(you.x, my.x);



ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [ANet] enemy [Re: Dark_samurai] #408407
09/30/12 17:36
09/30/12 17:36
Joined: Sep 2012
Posts: 21
France
larafale Offline OP
Newbie
larafale  Offline OP
Newbie

Joined: Sep 2012
Posts: 21
France
Thanks a lot, it works fine into the real enemy function.

Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

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