Author Topic: Logic Problems  (Read 7411 times)

0 Members and 1 Guest are viewing this topic.

Offline Ultimate Lex

Logic Problems
« on: July 28, 2002, 09:04:23 AM »
Logic 1 opens a screen with the name of my game. Then it jumps to logic 2 and a new room appears. It should also display an animation and after you press a button it should change the screen to 3...

if (isset(f5)) {
 load.pic(v0);
 load.view(7);
 draw.pic(v0);
 discard.pic(v0);
 set.horizon(50);
 status.line.off();
 prevent.input();
 program.control();
 show.pic();
 animate.obj(o1);
 set.view(o1,7);
 set.loop(o1,0);
 set.cel(o1,0);
 position(o1,50,95);
 set.priority(o1,15);
 ignore.objs(o1);
 animate.obj(o1);
 draw(o1);
}
if (have.key()) {
 stop.motion(o1);
 new.room(3);
}
return();

// Messages

Instead it gives the screen without the animation and also without the object it should animate. And you can't press a button to go to the next screen.
Could someone help me?



Offline Ultimate Lex

Re:Logic Problems
« Reply #1 on: July 28, 2002, 02:08:31 PM »
After I deleted that other animate.obj the game jumps from the first screen to the third screen, but if I restart the game, I'll be at screen2.
I also deleted the set(f14) and reset(f33) from Logic1 and put them in Logic 2 after the if(have.key)but it doesn't work.
Heeelp!!
P.S.Can someone tell me how to get "
« Last Edit: July 28, 2002, 03:25:36 PM by Mastercard »

Offline Ultimate Lex

Re:Logic Problems
« Reply #2 on: July 28, 2002, 06:29:31 PM »
Ehm...is it true that no-one can help me with this?Did I explain this in a wrong way?Or is this just something unbelievable and you don't know the answer?
Heeeelp meee...It's 2.26AM here and I'm desperate...

Offline robingravel

Re:Logic Problems
« Reply #3 on: July 28, 2002, 07:11:40 PM »
I can't tell you what's wrong with your code here.

The only way to find out the problem is to send me
your game. Don't worry, I'm not going to put it on my
site unless you announce it to the message board.

Robin Gravel

e-mails: robingravel@fjord-best.com
             robingravel@chez.com

Offline Ultimate Lex

Re:Logic Problems
« Reply #4 on: July 28, 2002, 07:46:37 PM »
Okka...
I sent the game.
*waiting eagerly to get back to work*

Offline robingravel

Re:Logic Problems
« Reply #5 on: July 28, 2002, 08:17:06 PM »
Here's the codes.

if (isset(f5)) {
 load.pic(v0);
 load.view(7);
 draw.pic(v0);
 discard.pic(v0);
 set.horizon(50);
 status.line.off();
 prevent.input();
 program.control();
 show.pic();
 animate.obj(o1);
 set.view(o1,7);
 set.loop(o1,0);
 set.cel(o1,0);
 position(o1,50,95);
 set.priority(o1,15);
 ignore.objs(o1);
 draw(o1);
 reset(f99);
}
if (have.key() && isset(f99)) {
 stop.motion(o0);
 reset(f99);
 stop.motion(o1);
 new.room(3);
}
if (!isset(f99)){
set(f99);
}
return();

Offline Ultimate Lex

Re:Logic Problems
« Reply #6 on: July 28, 2002, 08:27:55 PM »
Thanks Robin!
Now...could you explain me what I did wrong so next time it works.
Why this flag99?
What does that &&isset do?
What is this?:
}
if (!isset(f99)){
set(f99);

Thank you for info.

Offline Ultimate Lex

Re:Logic Problems
« Reply #7 on: July 28, 2002, 08:36:53 PM »
It doesn't work...
It still jumps from the first screen with the trees to the bar.
It should show the screen with the sofa first and then start the game...and it should restart from screen 3...
Could you help a little bit more..^^;

Offline robingravel

Re:Logic Problems
« Reply #8 on: July 28, 2002, 08:41:28 PM »
It seen like agi remembers when a key is pressed.

So it needs extra commands to make this code working.

Flag 99 is just a flag. I could use Flag 98 or flag 122.

!Isset means if the flag 99 is not set so the commands
in the "{}" are ignored. In this time, agi will forget that a key is pressed.

if (!isset(f99)){
set(f99);
}

This command sets the flag99 and the next time a key
will be pressed go to the next room.

Robin Gravel




Offline Ultimate Lex

Re:Logic Problems
« Reply #9 on: July 28, 2002, 08:44:30 PM »
Did you test this with my "game"?Cause mine doesn't work even now...Is there something wrong in some other logic??

Offline robingravel

Re:Logic Problems
« Reply #10 on: July 28, 2002, 08:48:09 PM »
I'm going to the bed. I'll look for it tomorrow.

Another thing: you can't use foreign characters in your
game. Myself, I can't put

Offline Ultimate Lex

Re:Logic Problems
« Reply #11 on: July 28, 2002, 08:57:12 PM »
Ok...
We'll I'll come here again tomorrow...
Just about those characters...I only needed them for my family name in the credits, cause I'm a finn...but then I'll have to make up some other solution.
See ya,

Offline robingravel

Re:Logic Problems
« Reply #12 on: July 29, 2002, 08:53:32 AM »

Did you test this with my "game"?Cause mine doesn't work even now...Is there something wrong in some other logic??


That's right. I test it in your game. What's wrong now?

Robin Gravel

Offline Ultimate Lex

Re:Logic Problems
« Reply #13 on: July 29, 2002, 10:51:46 AM »
Well, it jumps from screen 1(the one with trees) to screen 3(the bar)...it should show screen 2 also and when you press a key, game would start.

Offline robingravel

Re:Logic Problems
« Reply #14 on: July 29, 2002, 10:56:31 AM »
It works unless you press and hold a key.
I checked it today and it works.

Robin Gravel


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.018 seconds with 17 queries.