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), 718 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
multiple object detection #161489
10/17/07 04:52
10/17/07 04:52
Joined: Sep 2007
Posts: 49
O
onslaught147 Offline OP
Newbie
onslaught147  Offline OP
Newbie
O

Joined: Sep 2007
Posts: 49
how do i make it so where i can detect if a object comes to a certain distance but the object comparing and being compared are one in the same plus there are many other same objects scattered throughout the map any suggestions? ty


The only thing in life you can depend on is death and taxes.
Re: multiple object detection [Re: onslaught147] #161490
10/17/07 14:14
10/17/07 14:14
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline

User
TSG_Torsten  Offline

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
Sorry, I haven't understand you right. But maybe you could use c_trace (look in the manual). It gives you a pointer to the object, so you can compare it with other objects.

Regards
TSGames

Re: multiple object detection [Re: TSG_Torsten] #161491
10/18/07 18:57
10/18/07 18:57
Joined: Sep 2007
Posts: 49
O
onslaught147 Offline OP
Newbie
onslaught147  Offline OP
Newbie
O

Joined: Sep 2007
Posts: 49
what i need is a system to detect if the same objects, just multiple copies, get within a predefined distance of each other and activate a variable when they do. C_trace is not good for this because it requires to much calculating power, and since there will be several hundreds of this certain type of object in a level i need something that barely uses any processing power. any advice would be greatly appreciated. ty


The only thing in life you can depend on is death and taxes.
Re: multiple object detection [Re: onslaught147] #161492
10/18/07 19:45
10/18/07 19:45
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
oke i will give it a go

var offon;

function solid_rock
{
var ent1;
ent1 = my.skill1;
while(my!=null)
{
you = ent1;
if((vec_dist(my.x,you.x))<=100)
{offon = 1;}
wait(1);
}
}

function create_stuff
{
var tempa;
var tempb;
tempa = ent_create(source_mdl,nullvector,solid_rock);
tempb = ent_create(source_mdl,nullvector,solid_rock);
you = tempa;
you.skill1 = tempb;
you = tempb;
you.skill1 = tempb;
}

didnt test it but it would look like this


"empty"

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