Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
2 registered members (steyr, alibaba), 534 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
[SOLVED]If comparison is strange #346360
11/04/10 20:30
11/04/10 20:30
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Hey,

very confusing ratm, this could should just check if sth. is below my entity. This script is not working, but If i delete the else it works properly but wont change back to zero.
Code:
function isfrei()
{
	c_setminmax(me);
	VECTOR standard;
	vec_set(standard,my.x);
	VECTOR afk;
	vec_set(afk, vector(my.x - 224,my.y, my.z));
	while(me)
	{
		c_trace(my.x,standard,IGNORE_MAPS|IGNORE_ME|USE_BOX); 
		if(you)
		{
			squeeze = 1;
		}
		else
		{
			squeeze = 0;
		}
		wait(1);
	}
}


What the heck is wrong with that?

Last edited by TheLiam; 11/05/10 18:53.

"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: If comparison is strange [Re: Liamissimo] #346363
11/04/10 20:33
11/04/10 20:33
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
try to change else with if(!you)


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: If comparison is strange [Re: painkiller] #346364
11/04/10 20:37
11/04/10 20:37
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Stays 0 =/


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: If comparison is strange [Re: Liamissimo] #346365
11/04/10 20:38
11/04/10 20:38
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
you = NULL;
Before the c_trace.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: If comparison is strange [Re: JibbSmart] #346366
11/04/10 20:48
11/04/10 20:48
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Code:
you = NULL;
		c_trace(my.x,standard,IGNORE_MAPS|IGNORE_ME|USE_BOX); 
		if(you == ball)
		{
			squeeze = 1;
		}
		if(you == NULL)
		{
			squeeze = 0;
		}


Stays 0. But if I remove the if you == NULL it changes to 1... ARGH!


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: If comparison is strange [Re: Liamissimo] #346369
11/04/10 20:53
11/04/10 20:53
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
It looks to me like it's only tracing to its own position -- my.x->standard, where standard has been set to my.x.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: If comparison is strange [Re: JibbSmart] #346370
11/04/10 20:58
11/04/10 20:58
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Nono, standard is another vector. It works fine without the second else. But a friend is helping me ratm, he got a solution afaik wink


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: If comparison is strange [Re: Liamissimo] #346372
11/04/10 21:25
11/04/10 21:25
Joined: May 2009
Posts: 5,367
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,367
Caucasus
So, does it work now?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: If comparison is strange [Re: 3run] #346374
11/04/10 21:41
11/04/10 21:41
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
No, sorry. He told me that it couldn't work because there are 8 entitys who are checking if below them is free space...But I don't understand it... laugh

Anyone?

Last edited by TheLiam; 11/04/10 21:55.

"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: If comparison is strange [Re: Liamissimo] #346379
11/04/10 23:00
11/04/10 23:00
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline OP
Serious User
Liamissimo  Offline OP
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
I am now using c_content to detect a INVISIBLE PASSABLE Block. It stays 0...anyone used c_content?

Code:
function block_scann()
{
	c_content(my.x,0);
	if(you)
	{
		squeeze = 1;
	}
	else
	{
		squeeze = 0;
	}
}




"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Page 1 of 2 1 2

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

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