Gamestudio Links
Zorro Links
Newest Posts
blogherenowcenter
by 3s05bmmc. 06/05/24 06:08
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
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (VoroneTZ, AndrewAMD), 779 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19057 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: vec_dist help [Re: sadsack] #227405
09/14/08 09:56
09/14/08 09:56
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
This might be simple to solve by using a simple panel with a digit parameter wink wink
I actualy never use a text object to display numeric values by calculation, I only use it for string content.
For displaying numeric values, I mostly do it via a panel with no background attached.
Nevertheless, str_for_num should work in this case as well so just try it only with a panel.

Thanks in progress

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: vec_dist help [Re: frazzle] #227412
09/14/08 10:50
09/14/08 10:50
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
Code:
action get_dis_house()
{
draw_begin();
	house = my;
	snowman = you;
	my.ambient = 100;
	while (1)
	{
distance = vec_dist(house.x,snowman.x);

str_for_num(dis,distance); 
if(distance == 0)
{
draw_text("you got a problem",20,20,vector(255,255,0));
}
else
{
draw_text(dis,20,20,vector(255,255,0));
}
	
	if(distance >100) 
	
{sys_exit ("Thank you for playing");}
	
	 wait (1);
	}

}



"empty"
Re: vec_dist help [Re: flits] #227452
09/14/08 14:38
09/14/08 14:38
Joined: Aug 2008
Posts: 408
mi usa
sadsack Offline OP
Senior Member
sadsack  Offline OP
Senior Member

Joined: Aug 2008
Posts: 408
mi usa
Thanks flits, but there is not any display on the screen. I will look over your code.
Thank you very much.
renny

Last edited by sadsack; 09/14/08 14:38.

I have A7 Commercial .............. Now I just need to learn how to use it

Re: vec_dist help [Re: sadsack] #227467
09/14/08 15:34
09/14/08 15:34
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
if there is nothing on the screen make sure that get_dist_house is running because it always answers somthing


"empty"
Page 2 of 2 1 2

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