Need help withan ending

Is there a function, or something like that, that will read: until Alien Ace is dead then spawn this and this etc.?
 
Wwwhhhhaaattt???????!

The compiler crashes every time I try to compile that mission code. It works fine on compiling everything else including other versions. It says it is trying to recover from an error. At 1st it was the MS_space flight thing then it was the next thing up-some ends got rid of some of those and it still has a problem. What is going on?

EDIT: Never mind-it was just the fact that I had it set to not halt on errors. :eek: Probably just because there were way too many errors. :eek:
 
Nav2 is crashing again!-when I enter the game

function M_Nav2;
var
setup = true;
begin
if (NAV_WithinSphere(Alpha1)) then begin
Nav_ActivateSelf;
//M_Spawn(2,17,12000,1000,2330);
//M_Spawn(30,10,11000,1200,2333);
setup := false;
end;
//if(M_AliveEnemies = 0)
//then begin
//SF_ObjectiveSetComplete(mobj_defend);
//SF_SetMissionSuccess;
NAV_SetPlayerNav(1);
until(NAV_WithinSphere(Alpha1)=false) do begin
AI_WaitSeconds(1);
end;
NAV_DeactivateSelf;
end;
 
Iceblade said:
Probably just because there were way too many errors.
Never, ever do that. You can't make an error go away simply by ignoring its existence - so don't try to. The sooner you find, indentify, and fix an error, the better.

About the Alien Ace - that's the time for you to get creative. You know how variables work, you know how death functions work, and you know that you can use a variable to trigger another statement elsewhere. Time to put that knowledge together.

As for Nav 2... well, you've just demonstrated something that I've actually been wondering about. If a navpoint's function actually ends, will it crash the game? The answer, apparently, is yes :). Where's your while (1) loop? You need something to prevent that very last 'end' from ever being used.
 
I wasn't ignoring errors, the compiler was screwing up trying to recover from some error and it wouldn't even tell me the errors-when in settings I told it to show all errors. When I deselected that compiler worked fine and told me the errors one by one.

*makes changes, begins mission, blows top*

It gave a warning of a infinete loop of 100 times. I put it right after the deactivate.
 
That's right, you need to have something in the actual loop. But that's not the problem here, because you're doing it wrong anyway. Don't create a loop after the NAV_DeactivateSelf command. Put the end of the loop there. Put the start of the loop right after the first begin. This way, the nav can be activated and deactivated as many times as you like. If you just have an endless loop after NAV_DeactivateSelf, you'll only be able to visit the navpoint once.
 
I did it!!

I got the navs to work- with the wrong coding, yet it works fine.

Another question though, how do the coordinates work? Is it specific to the nav or does it go by a bigger overall coordinate plane? The answer to this could fix several problems I have.

P.S. There are several questions over at the other thread about WCPPas.
 
Back
Top