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
1 registered members (TipmyPip), 18,484 guests, and 6 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
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 | 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