problem with some stuff

Joey k. alot needs to be helped with in this thread. (not really but anyway.) first off, i have this code:

if(f118){
move.obj(o1,100,10,1,119);
reset(f118);
}

what happens is it doesnt even go to the spot. if i get rid of the reset(f118); then the object goes to where it is supposed to, but doesnt set the flag. how can i make this work? (its supposed to move to those coords and set a flag.)

second, if i go to the end of the screen and have it print something to stop me from going to the next screen, it keeps repeating itself. so if i go to the next screen but it does print and not new room, it will say hi over and over. how can i fix this so it says it once?

and lastly, in a version what do the numbers represent. anything special? do the numbers passed the decimal mean anything?
Andrew_Baker Well, for starters, that should be move.obj(o1,100,10,1,f119);

Did you make sure to have an 'f' before '119'?


Secondly, if it is a problem of keeping an ego from walking off the screen, make sure that you reset ego_dir to a value that will move him away from the screen edge.

Third, the version numbers on any given software are fairly arbitrary. There is already a thread somewhere on the mega-tokyo forum (I'm not sure where) that goes into this at length, but I use 0.x for initial unreleased software, 1.x for the alpha, 2.x for beta, Full.x for public release, and Gold.x for enhanced public release, incrementing x for each full build.
Joey ok thanks. so the version number can be anything?
CESS.tk If you want to start with 93.5648.156 and end with -0.00.00.3.00.000.0, we can't stop you (but I'd say, don't...)
Joey errr, andrew? that flag thingy didnt help at all. nothing new happened. let me say this again.

if i dont reset the flag, the object moves to where it is supposed too but doesnt set a flag. if i do reset the flag, it doesnt move where its supposed to, but sets the flag. what can i do so it sets the flag when it moves?
jelleghys AGI Games, Fan and Commercial
Version Counter?

http://www.mega-tokyo.com/forum/index.php?board=4;action=display;threadid=787;start=0
Joey well could someone tell me about that code please? i would like to get that finished today.

thanks.
Kon-Tiki Have you tried this?

if (isset(f119)) {
reset(f118);
//rest of your code
}


-Kon-Tiki-
Joel After looking at the code you sent me and scratching my head for a while, I think I've figured out the problem. First of all, it's not that the flags aren't getting set. It's that they ARE getting set, but before the object reaches its destination.

The problem, I believe, is that you are positioning the object o1 at y position 10. I suspect that the view for o1 is larger than 10 pixels high (which means that the y position for the top row of pixels for the object is less than 0). When you issue the move.obj() command, AGI is probably getting confused, so it just sets f118 immediately instead of when the object reaches its destination.

I think that you can correct the problem by setting the y position for o1 no smaller than 1 less than height of the tallest cel in the loop (it probably works with 1 less than because the y coordinates use 0-based numbering and the height uses 1-based). Change the y position in BOTH the position() command and the move.obj() command, and it should work.

As for your other problem about messages repeating like crazy, if ego is touching the edge of the screen, then just add ego_dir = stopped; If ego is touching a signal line or is inside a posn() box, then you'll have to do ego_dir = stopped; AND reposition ego.
Joey ok thanks a lot joel. i will try that after. thank you for your time and reviewing it.