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
0 registered members (), 18,767 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
Index #295987
10/28/09 22:05
10/28/09 22:05
Joined: Nov 2008
Posts: 109
J
JGGamer Offline OP
Member
JGGamer  Offline OP
Member
J

Joined: Nov 2008
Posts: 109
I want to know how I can create a whole set [like a list] of entities of the same model, and then find the nearest to an object. I am sure I have seen it done before.
For example:

Code:
function blocks(ENTITY* myBlock) // not sure about this.
{
	myBlock[1] = ent_create("block.mdl",vector(-192,192,0),NULL);
	myBlock[2] = ent_create("block.mdl",vector(-160,192,0),NULL);
	myBlock[3] = ent_create("block.mdl",vector(-128,192,0),NULL);
	myBlock[4] = ent_create("block.mdl",vector(-96,192,0),NULL);
	myBlock[5] = ent_create("block.mdl",vector(-64,192,0),NULL);
	myBlock[6] = ent_create("block.mdl",vector(-32,192,0),NULL);
	myBlock[7] = ent_create("block.mdl",vector(0,192,0),NULL);
	myBlock[8] = ent_create("block.mdl",vector(32,192,0),NULL);
	myBlock[9] = ent_create("block.mdl",vector(64,192,0),NULL);
	myBlock[10] = ent_create("block.mdl",vector(96,192,0),NULL);
	myBlock[11] = ent_create("block.mdl",vector(128,192,0),NULL);
	myBlock[12] = ent_create("block.mdl",vector(160,192,0),NULL);
	myBlock[13] = ent_create("block.mdl",vector(192,192,0),NULL);

}



I know this is not right, but it is done something like it.
I would then find the closest to my object.

Can someone help me please?

Re: Index [Re: JGGamer] #295988
10/28/09 22:11
10/28/09 22:11
Joined: Nov 2008
Posts: 109
J
JGGamer Offline OP
Member
JGGamer  Offline OP
Member
J

Joined: Nov 2008
Posts: 109
Sorry
I found the answer in the manual under Variables and Arrays.


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