2 registered members (AbrahamR, 1 invisible),
858
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Crash in sys
[Re: MMike]
#332758
07/11/10 23:42
07/11/10 23:42
|
Joined: Jul 2009
Posts: 1,198 Berlin, Germany
Liamissimo
OP
Serious User
|
OP
Serious User
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
|
Yeah, but in the while: It want a rock. So, when there is no rock it just dont run. I dont understand why it causes an error if an while condition isn't true. Now, if I right_klick nothing happens. Can't be so difficult
function rocket_weg()
{
wait(1);
ent_remove(rock);
vec_set(camera.x,nullvector);
scan_base = 1;
b = 0;
}
function rocket_launch()
{
rock = ent_create("sphere.mdl",camera.x,NULL);
wait(1);
set(rock, INVISIBLE);
rock.emask |= (ENABLE_BLOCK | ENABLE_ENTITY);
rock.event = rocket_weg;
while(rock)
{
wait(1);
vec_set(camera.x,rock.x);
c_move(rock,nullvector,vector(30*time_step,(key_a - key_d),(key_w - key_s)), GLIDE);
}
}
action rocket_base()
{
while(!ball){wait(1);}
while(me && scan_base == 1)
{
c_scan(my.x,my.pan, vector(360,180,15), IGNORE_ME);
if(you == ball)
{
if(key_e)
{
scan_base = 0;
ent_animate(me,"auf",base_perc,0);
base_perc += 5*time_step;
}
if(mouse_right != NULL && b == 0)
{
b = 1;
rocket_launch();
}
control = 0;
ball_enabl = 1;
phent_enable(ball,0);
ent_animate(me,"zu",base_perc,0);
base_perc += 5*time_step;
c_setminmax(me);
}
wait(1);
}
}
"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen." -JCL, 2011
|
|
|
Re: Crash in sys
[Re: Liamissimo]
#332759
07/11/10 23:47
07/11/10 23:47
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
I did not read the whole topic but you should change while(rock) { wait(1); vec_set(camera.x,rock.x); c_move(rock,nullvector,vector(30*time_step,(key_a - key_d),(key_w - key_s)), GLIDE); }
to
while(rock) { vec_set(camera.x,rock.x); c_move(rock,nullvector,vector(30*time_step,(key_a - key_d),(key_w - key_s)), GLIDE); wait(1); }
I hope you see why the second version is the only one that's correct.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
Re: Crash in sys
[Re: CoburnDomain]
#332873
07/12/10 16:01
07/12/10 16:01
|
Joined: Jul 2009
Posts: 1,198 Berlin, Germany
Liamissimo
OP
Serious User
|
OP
Serious User
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
|
Thanks Superku, of course wait to the end.
So, do you say I have to create a while(1) loop INSTEAD of the while(rock)?
"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen." -JCL, 2011
|
|
|
Re: Crash in sys
[Re: Superku]
#332878
07/12/10 16:16
07/12/10 16:16
|
Joined: Jul 2009
Posts: 1,198 Berlin, Germany
Liamissimo
OP
Serious User
|
OP
Serious User
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
|
Me too. I am sure it is still saying Invalid Argument. VCant test it right now because problems with A8
"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen." -JCL, 2011
|
|
|
Re: Crash in sys
[Re: Liamissimo]
#332895
07/12/10 18:46
07/12/10 18:46
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
I have SYS error with A8, it never use to appear in A7. Here is the code:
function gravity_()
{
my_height = c_trace(my.x,vector(my.x,my.y,my.z - 1000),IGNORE_MODELS|IGNORE_FLAG2|IGNORE_PASSABLE|USE_BOX);
if(my_height > 10)
{
accelerate(absdist.z,-10 * time_step,-1);
}
else
{
absdist.z =-(my_height/1.2)+4;
absdist.z = clamp(absdist.z,-4,4);
}
}
action hero_()
{
while(my.health > 0)
{
gravity_();
/// c_move here and wait(1);
}
}
It appears some times, when I shoot enemies.
|
|
|
|