Mastercard |
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? |
Mastercard | 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 " |
Mastercard |
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... |
Robin_Gravel |
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 |
Mastercard |
Okka... I sent the game. *waiting eagerly to get back to work* |
Robin_Gravel |
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(); |
Mastercard |
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. |
Mastercard |
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..^^; |
Robin_Gravel |
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 |
Mastercard | Did you test this with my "game"?Cause mine doesn't work even now...Is there something wrong in some other logic?? |
Robin_Gravel |
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 |
Mastercard |
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, |
Robin_Gravel |
Mastercard wrote: That's right. I test it in your game. What's wrong now? Robin Gravel |
Mastercard | 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. |
Robin_Gravel |
It works unless you press and hold a key. I checked it today and it works. Robin Gravel |
Mastercard |
You know Robin, I found a slight mistake... I have been using Visual C++ much lately and I have got used to do like I do in that...well...I forgot to PUSH THE COMPILE BUTTON!!!... Now it works nicely EXCEPT....why isn't there now change to use menu or write anything when the game starts?Do I have to put those codes after the if isset 99 or in the new room? |
Robin_Gravel |
Oops. Sorry Mastercard. I forgot to add accept.input() command. Just add it before new.room command. accept.input(); new.room(x); It should work. Robin Gravel |
Mastercard | And I also have to put the set(f14) before the new.room, right? |
Robin_Gravel |
Right. And do not forget reset(f33); and status.line.on(); too. Robin Gravel |
Mastercard | Well thank you for all this, just one more.. I want to have text in that screen2 but the animation should run for like 2 seconds first and then that text comes and after that text the animation should also run a little bit more.How to do this? I'm also having problems with inventory items.If I write look item it shows it, but if I choose it from "show object" it doesn't show it.Why is this? I know that this is usually in logic 90.Is there some tutorial for this? |
Mastercard |
I have still those same problems, but now I put ope some new room. They work fine except for one, which for some odd reason is nearly wholly black.I don't understand why?Can some code do this and change the colours? |
Robin_Gravel |
If you want more than one object in inventory, you should edit defines.txt. For the inventory problem, you should edit logic.0 What do you mean by "wholly black" ? Robin Gravel |
Mastercard | Is it okay if I'll send you the game and you can check by yourself? it's hard to describe it... |
Robin_Gravel |
Yes. I'll check it? Robin Gravel |
Mastercard | Yes..that would be nice.I'll send it right away.This is that changed version. And now we'll just wait a bit... |
Robin_Gravel |
It's not a coding problems. It's a picture problems. Something's wrong with picture.3 that neither agi or Nagi can handle it. I checked the picture.003. Some lines are drew and removed later. I remember back a fan game with dealing with a president I played 3 years ago. The game was "president's quest" but I'm not sure. In this game, a full picture was drew, removed and redrawn again. But AGI can handle "the president's quest" picture it but it's odd it can't draw your picture perfectly. You should redraw the picture 3. Robin Gravel |
Mastercard | Well, it's okay, I just wanted to check. Edgar will draw a new picture anyway so it's all right. |