Author Topic: Game in Progress  (Read 2810 times)

0 Members and 1 Guest are viewing this topic.

Randy

  • Guest
Game in Progress
« on: November 25, 2002, 12:03:54 PM »
The game I'm working on is going along pretty well. I was wondering, though, does anyone know how to have a text box appear and not be affected by the user pressing the [Enter] key -- it closes after a set amount of time and I don't want the user to compromise this time setting by prematurely closing the text box manually.

Also, I would like to continue an animation of the person talking in the background while the text box is up (like the watch/communicator thing in SQ2). Right now the animation stops when the box comes up and I'm hoping I can get some advice on how to override this. Does anyone know how to do this? Please respond if you do.

Thanks.



Offline Andrew_Baker

Re:Game in Progress
« Reply #1 on: November 25, 2002, 01:14:43 PM »
As far as I know, you can't have animation while a text box is open.  You can however use the "display" command to show text at any time.

As far as overriding the <Enter> key during the display of a print(); check the help files that came with AGIStudio, as I'm sure that issue is discussed in the print section.
I hope you realize that one day I will devour the Earth.

Randy

  • Guest
Re:Game in Progress
« Reply #2 on: November 25, 2002, 01:22:04 PM »
Perhaps I'm mistaken, but I was positive I remembered the boss guy talking to Roger Wilco on the watch/communicator in Space Quest 2 and the text box appeared at the bottom of the screen while the animation of the boss talking on the watch face continued.

Does anyone else remember this?

Offline Eigen

Re:Game in Progress
« Reply #3 on: November 25, 2002, 01:48:32 PM »
There's also a possibility to use     show.obj(number); comand. Write dialog as description. That should work.
Artificial Intelligence Competition

Offline Eigen

Re:Game in Progress
« Reply #4 on: November 25, 2002, 01:54:46 PM »
Never mind! I tried and it didn't work. Sorry :-[
Artificial Intelligence Competition

Kon-Tiki

  • Guest
Re:Game in Progress
« Reply #5 on: November 25, 2002, 02:07:08 PM »
Try to figure out the code of that scene of SQ2. I'll try to make some time free to do the same, but can't promise anything (got exams starting this week, so that's prior to AGI)

-Kon-Tiki-

Offline Jelle

Re:Game in Progress
« Reply #6 on: November 25, 2002, 02:14:09 PM »
In which room does it happen?
Politics is supposed to be the second-oldest profession. I have come to realize that it bears a very close resemblance to the first.

Offline Andrew_Baker

Re:Game in Progress
« Reply #7 on: November 25, 2002, 02:16:13 PM »
Hmm, you're right.  I have that game, too.  I opened it up in AGIStudio, but without a src folder, it looks like a pig's breakfast of unnamed variables and flags.  The good news for you is that they are using a normal print.at statement.

EDIT:  I tried to attach a text file of the offending code :), because it is rather large to quote.  It didn't work.  If someone can point out what I need to do, I'll post it.
« Last Edit: November 25, 2002, 02:18:23 PM by Andrew_Baker »
I hope you realize that one day I will devour the Earth.

Offline robingravel

Re:Game in Progress
« Reply #8 on: November 25, 2002, 03:48:25 PM »
The game I'm working on is going along pretty well. I was wondering, though, does anyone know how to have a text box appear and not be affected by the user pressing the [Enter] key -- it closes after a set amount of time and I don't want the user to compromise this time setting by prematurely closing the text box manually.

Also, I would like to continue an animation of the person talking in the background while the text box is up (like the watch/communicator thing in SQ2). Right now the animation stops when the box comes up and I'm hoping I can get some advice on how to override this. Does anyone know how to do this? Please respond if you do.

Thanks.


Use  set(f15); to see animations with textbox.

...
  set(f15);  // You'll need it to use animations.
  v21 = 10;  // displays the text for a while.
  print("Hello world");

...

Robin Gravel

Offline Joel

Re:Game in Progress
« Reply #9 on: November 25, 2002, 05:25:32 PM »
I can't say I've ever done it, but it sounds like Robin's got the right idea, based on the AGI Studio help file.

Set f15 (windows_remain), and when you want to close the window, issue the close.window command.

Randy

  • Guest
Re:Game in Progress
« Reply #10 on: November 25, 2002, 06:46:48 PM »
Thank you all for responding so quickly.
I will give that a try tonight.

Randy

  • Guest
Re:Game in Progress
« Reply #11 on: November 26, 2002, 09:19:51 AM »
Hey, what do you know...it works. I did notice that any animated views that continue to play and are behind the textbox will "cut into" the textbox appearing in front of it. Although it was a little unexpected at first, it makes sense that it would do that since the textbox is drawn once and the anim continues to be redrawn.

A little creative positioning and everything looks fine.

Thank again. I'm looking forward to completing this project.

Offline Rich

Re:Game in Progress
« Reply #12 on: November 26, 2002, 11:46:55 PM »
yes, Robin's values are correct. you must set f15 and then use v21 to set how long it should be open for. This will allow the animations to go while the window is open. However, if the animations are anywhere near the box, they will go into it and it will look funny. I avoid this by using a print.at command so i can put the box safely out of the area of animation. Also, something else I noticed, if you want to have several text boxes appear one after the other with this feature you need to set f15 each time. It seems to reset after each window box that is opened.


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

Page created in 0.02 seconds with 17 queries.