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,561 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
c_trace #319421
04/14/10 20:47
04/14/10 20:47
Joined: May 2006
Posts: 148
Latvia
MTD Offline OP
Member
MTD  Offline OP
Member

Joined: May 2006
Posts: 148
Latvia
Hi everyone,

Have a little problem with c_trace, hope that someone can help me.

First-
When I build a house on map, a check is made that no other house is in the way. (The check is made by c_trace: point-to-point)

The Scenario-
I build a house somewhere in the map and everything is OK, i start to build another house near the first build house and the second build house somehow traces the first house (even when it shouldn't trace it)
http://www.youtube.com/watch?v=oTXszAGLkuA

The Other Scenario-
When the first building is build and I build the second more away everything works OK.

Why is this happening?

Re: c_trace [Re: MTD] #319428
04/14/10 20:58
04/14/10 20:58
Joined: May 2006
Posts: 148
Latvia
MTD Offline OP
Member
MTD  Offline OP
Member

Joined: May 2006
Posts: 148
Latvia
Here is the code that traces the house ground

Click to reveal..

Code:
if(mouse_left==1)
{
	a=1;//start at the first vertex of the house
	nevar_celt=0;//Can i build a house here
	while(a<=5)//check if can build
	{
		b=a+1;//secodn traced vertex
		if(a>=5){b=1;}//Trace the first node, so that a square is traced
		vec_for_vertex(node_pos,building_name,a);
		vec_for_vertex(node_pos2,building_name,b);
		if(c_trace(node_pos,node_pos2,IGNORE_ME|IGNORE_PASSABLE)>=1||c_trace(node_pos2,node_pos,IGNORE_ME|IGNORE_PASSABLE)>=1)
		{
			nevar_celt=1;//can't build the house here
			set(building_name,LIGHT);
			building_name.green=0;
			building_name.blue=0;
			building_name.red=255;
			wait(-.1);
			reset(building_name,LIGHT);
		}
		a+=1;//Continue to the next vertex
		wait(1);
	}
}




Re: c_trace [Re: MTD] #319513
04/15/10 13:44
04/15/10 13:44
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
have a look at c_setminmax, i'm guessing that it's detecting the bounding box of the other house


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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