Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Why does this not work? //Take 2

7 replies · 1,654 views · Started 06 October 2007

 ffc script start_warp{ //start script
void run(int map, int scr){ //start void run
while(true){ //start while loop
if(Link->InputStart){ //start if
Link->PitWarp(map,scr);
} //end if
Waitframe();
} //end while loop
} //end void run
} //end script

Why is this not working... Again...

This script just seems to do absolutely nothing. It seems like it should be quite simple. I don't understand why it's not working.

Can someone help me please?

Joe123 wrote:
 ffc script start_warp{ //start script
void run(int map, int scr){ //start void run
while(true){ //start while loop
if(Link->InputStart){ //start if
Link->PitWarp(map,scr);
} //end if
Waitframe();
} //end while loop
} //end void run
} //end script

Why is this not working... Again...

This script just seems to do absolutely nothing. It seems like it should be quite simple. I don't understand why it's not working.

Can someone help me please?

Well unfortunately for you, it shoud be working so you're gonna have to go into debug mode.

 ffc script start_warp{ //start script
void run(int map, int scr){ //start void run
while(true){ //start while loop
Link->PitWarp(map,scr);

Waitframe();
} //end while loop
} //end void run
} //end script

Try this.

It's either buggy with

A)Link->Pitwarp. Nothing you can do about that.

or

B)if(Link->InputStart){

I'm suspecting the second. For some reason it's cutting out before the Pitwarp bit.

What are you trying to establish by getting me to try that? Whether the Pitwarp() command works?

Because I've tried doing that already, and it does.

Joe123 wrote:What are you trying to establish by getting me to try that? Whether the Pitwarp() command works?

Because I've tried doing that already, and it does.

Well you know what the problem is already then, don't you? 😉

I'm questioning whether Link->InputStart even works at all.

If something simple like:

if(Link->InputStart){
Link->HP + 16; }

doesn't work then you know it's broken. In that case i'd post it as a bug.

well, I assumed it was to do with my rather basic level of scripting, and that I was doing something wrong :P

However, I tried this:

 ffc script start_warp{ //start script
void run(int map, int scr){ //start void run
while(true){ //start while loop
Link->InputStart = false;
} //end if
Waitframe();
} //end while loop
} //end void run
} //end script

Also, which did a pretty good job of disabling the subscreen.

And this:

 ffc script start_warp{ //start script
void run(int map, int scr){ //start void run
while(true){ //start while loop
Link->InputStart = false;
if(Link->InputStart){
Link->Pitwarp(map, scr);
} //end if
Waitframe();
} //end while loop
} //end void run
} //end script

Because Saffith said that the subscreen opening might stop the script from working properly, and that I should disable it. Which didn't work either.

Hmm...that's interesting. The subscreen overrides warp functions.... I'm interested in what DarkDragon would say about this.

.....I can think of two remedies, changing Input start to InputL......or a for loop.......hrm, wait.

Try this:


ffc script start_warp{ //start script
void run(int map, int scr){ //start void run
int dur = 0;
while(true){ //start while loop
if(Link->InputStart){ dur = 1;} if(dur == 1){ Link->PitWarp(map,scr); }
} //end if
Waitframe();
} //end while loop
} //end void run
} //end script

If that doesn't work you might have to change InputStart. What's so important about the start button anyway?

Joe123 wrote:

And this:

 ffc script start_warp{ //start script
void run(int map, int scr){ //start void run
while(true){ //start while loop
Link->InputStart = false;
if(Link->InputStart){
Link->Pitwarp(map, scr);
} //end if
Waitframe();
} //end while loop
} //end void run
} //end script

This obviously isn't going to work. You're setting InputStart to false then immediately checking to see if its true. Try putting Link->InputStart = false inside your if statement.

:surprise: Thankyou Preathus!
I never thought of doing that, it seemed a bit strange at the time to tell it that start wasn't being pressed, then to check if it was.

ffc script start_warp{ //start script
void run(int map, int scr){ //start void run
while(true){ //start while loop
if(Link->InputStart){ //start if loop
Link->InputStart = false;
Link->PitWarp(map,scr);
} //end if loop
Waitframe();
} //end while loop
} //end void run
} //end script

Oh, and I wanted it to be start because it's the title screen Gleeok :P Thanks anyway by the way.