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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, RealSerious3D, BrainSailor), 1,265 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 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 | 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