|
2 registered members (steyr, alibaba),
534
guests, and 4
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
[SOLVED]If comparison is strange
#346360
11/04/10 20:30
11/04/10 20:30
|
Joined: Jul 2009
Posts: 1,198 Berlin, Germany
Liamissimo
OP
Serious User
|
OP
Serious User
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.
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
Serious User
|
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: JibbSmart]
#346366
11/04/10 20:48
11/04/10 20:48
|
Joined: Jul 2009
Posts: 1,198 Berlin, Germany
Liamissimo
OP
Serious User
|
OP
Serious User
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
|
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
JibbSmart
Expert
|
Expert
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: 3run]
#346374
11/04/10 21:41
11/04/10 21:41
|
Joined: Jul 2009
Posts: 1,198 Berlin, Germany
Liamissimo
OP
Serious User
|
OP
Serious User
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...  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
Liamissimo
OP
Serious User
|
OP
Serious User
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?
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
|
|
|
|