View previous topic :: View next topic |
Author |
Message |
bis_senchi

Joined: 08 Jun 2004 Posts: 460 Location: Reims, France
|
Posted: Fri Jul 07, 2006 10:35 pm Post subject: Problem with the load menu command |
|
|
When I test the following script it launchs automatically the into script and I don't understand why. Would somoene had an idea?
Code: |
#show the load menu
variable(slot)
slot:= load menu(false)
if(slot==-1) then, begin
#if the player choose quit, it ends the game
game over
end
if(slot==0) then, begin
#new game
the save slot:= -1 #mark it as a new game
#beginning of game script
introduction1
end, else, begin
#Load a saved game
load from slot(slot)
end
|
|
|
Back to top |
|
 |
Iblis Ghost Cat

Joined: 26 May 2003 Posts: 1233 Location: Your brain
|
Posted: Fri Jul 07, 2006 10:50 pm Post subject: |
|
|
Maybe try putting "show value (slot)" and a wait after the load menu command to make sure it's returning the right values?
Quote: | the save slot:= -1 |
Can you have spaces in a variable name?
I'm not sure what the problem with this script is, but what is it supposed to do? I may be missing something, but it seems to simulate the function of the normal load menu exactly, which is nice if you're making a custom load menu, but this just uses the default load menu so I don't see what the point is. What does this script do that isn't accomplished by load menu (true)? _________________ Locked
OHR Piano |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sat Jul 08, 2006 7:16 am Post subject: |
|
|
Yeah, you can have spaces in anything:
is the same as is the same as Code: | t
h
e
s
a
v
e
s
l
o
t |
_________________
|
|
Back to top |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Sat Jul 08, 2006 1:52 pm Post subject: |
|
|
Moogle1 wrote: | Yeah, you can have spaces in anything:
is the same as is the same as Code: | t
h
e
s
a
v
e
s
l
o
t |
|
Uh, sorry to burst your bubble, but no it isn't. The first two are equivalent, but the last one is the same as "t,h,e,s,a,v,e,s,l,o,t", which is not a variable.
Iblis wrote: | I'm not sure what the problem with this script is, but what is it supposed to do? I may be missing something, but it seems to simulate the function of the normal load menu exactly, which is nice if you're making a custom load menu, but this just uses the default load menu so I don't see what the point is. What does this script do that isn't accomplished by load menu (true)? |
This is half of a script that's used to simulate "save in a slot once, and that's the slot for the rest of the game" behaviour.
bis_senchi, if you're trying to do the same thing as Mr. B in the other thread, then fine. If you just want normal saving behaviour, then just use load menu(true).
Anyway, what do you mean by "it launchs automatically the into script"? What slot are you chosing (or new game), and which part of the script is being executed? And, is this script set as the new-game script? And, in addition, are you using the "Skip title screen" and "Skip load screen" bitsets? If you aren't, this script is useless to you. _________________ I stand corrected. No rivers ran blood today. At least, none that were caused by us.
Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sat Jul 08, 2006 3:27 pm Post subject: |
|
|
Oh, right then. It's too bad; I could've started writing all my scripts like that. _________________
|
|
Back to top |
|
 |
bis_senchi

Joined: 08 Jun 2004 Posts: 460 Location: Reims, France
|
Posted: Sat Jul 08, 2006 9:58 pm Post subject: Ok... |
|
|
A huge thanks to Moogle1 for this important information
Quote: |
Yeah, you can have spaces in anything:
is the same as
|
After a few tests and some investigations, it appears that the single load menu commands is
what I need. So I came up to the following basic script.
Code: |
#----------------------------------
script, test load menu, begin
#show the load menu
load menu(true)
end #end of the plotscript
#----------------------------------
|
My problem is the following: the load menu does not pop up.
Here is how I make the tests. The script is script number 79. I give it to a npcs from map1. To test and see if it works, I just launch the game and then go to speak to him. May this is a part of the problem.
What could be the reasons for the command not to run correctly/ not to be effective?
As always thanks very much for the help. |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Sat Jul 08, 2006 11:20 pm Post subject: |
|
|
Make sure the script is running. The easiest way to do this is by adding in a show value line or two:
Code: | #----------------------------------
script, test load menu, begin
#testing
showvalue(0)
#show the load menu
load menu(true)
#testing
showvalue(1)
end #end of the plotscript
#---------------------------------- |
Error-checking statements like that are an invaluable tool in bugtesting. If it displayed a zero (which will not happen in this case, mind you), then you would know that the script was crashing during load menu. If it displays a one (much more likely), then you know the script is executing, but load menu is doing nothing. _________________
|
|
Back to top |
|
 |
bis_senchi

Joined: 08 Jun 2004 Posts: 460 Location: Reims, France
|
Posted: Sun Jul 09, 2006 9:19 pm Post subject: Value 1 is returned! |
|
|
As Moogle 1 said I've made the test and I returned 1 which means that the script is executing, but load menu is doing nothing.
Now the question is: why does the load menu do nothing? What can be the reasons of that?
Thanks once more to Moogle1 for his numerous posts and advice |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Mon Jul 10, 2006 6:53 am Post subject: |
|
|
Bizarre. You might want to try your script in hasta-la-qb, the newly-released version of OHR. _________________
|
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Mon Jul 10, 2006 3:35 pm Post subject: |
|
|
Do you have any saved games? Just like the normal load menu, if there are no saved games, the load menu doesn't display. It just returns 0 (new game). _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
bis_senchi

Joined: 08 Jun 2004 Posts: 460 Location: Reims, France
|
Posted: Mon Jul 10, 2006 9:55 pm Post subject: I've downloaded Hasta-la-qb and... |
|
|
The Mad Cacti have said:
Quote: | Do you have any saved games? |
Yes I knew that load menu display only if there are save slot. I usually make load slot 1 to launch the game and make my test.
I've downloaded hasta-la-qb and it made the situation worsed. Now hspeak.exe does not recognise the load menu command anylonger and when I installed the previous version of hspeak.exe (Hspeak.exe nighly build) it does not work either.
Does anyone has suggestions?
Let's hope that one day the command load menu will be officialy implemented so that game makers do not have to make all those efforts to put a good intro for their games!
Thank for help and support! |
|
Back to top |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Tue Jul 11, 2006 1:54 pm Post subject: |
|
|
Mike Caron, in many places, wrote: | NOTE: Hasta-la-QB is primarily a bug fixing release. There is but one new feature in this release, and it’s only a stupid little plotscripting command. However, the bugfixes are for both the DOS and QB versions, so it’s still recommended to download. |
load menu is NOT in hasta-la-qb. You need a nightly build, just like you did a few days ago. _________________ I stand corrected. No rivers ran blood today. At least, none that were caused by us.
Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ |
|
Back to top |
|
 |
bis_senchi

Joined: 08 Jun 2004 Posts: 460 Location: Reims, France
|
Posted: Thu Jul 13, 2006 11:38 pm Post subject: Hourra! |
|
|
After a few searches, It appeared that my problem was due to the bad version of custom.exe and game.exe
I can now display the load menu using plotscripting
That's really a useful command!
But guess what... I came up with another problem
But these on shoud be rather easy to solve. Here it is
Code: |
define script, test cutscene, begin
suspend npcs
suspend player
set on keypress script (none)
show backdrop (10)
wait (30)
show text box (102)
wait (30)
show text box (103)
wait (30)
resume npcs
resume player
end
|
My problem is the following, I would like my keypress script to came back as it was (obviously as it was before the script starts). My default keypressed script is script 48.
Thanks once more for answering so quickly to my numerous!
Good luck in making your games! |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Fri Jul 14, 2006 8:28 am Post subject: Re: Hourra! |
|
|
Code: |
define script, test cutscene, begin
suspend npcs
suspend player
set on keypress script (none)
show backdrop (10)
wait (30)
show text box (102)
wait (30)
show text box (103)
wait (30)
set on keypress script(48)
resume npcs
resume player
end
|
Or better yet, you can use this syntax:
Code: |
define script, test cutscene, begin
suspend npcs
suspend player
set on keypress script (none)
show backdrop (10)
wait (30)
show text box (102)
wait (30)
show text box (103)
wait (30)
set on keypress script(@scriptname)
resume npcs
resume player
end
|
Where scriptname is the name of your normal on keypress script.
(We ought to put that in the docs, I think) |
|
Back to top |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Fri Jul 14, 2006 6:03 pm Post subject: Re: Hourra! |
|
|
James Paige wrote: | Code: |
define script, test cutscene, begin
suspend npcs
suspend player
set on keypress script (none)
show backdrop (10)
wait (30)
show text box (102)
wait (30)
show text box (103)
wait (30)
set on keypress script(48)
resume npcs
resume player
end
|
Or better yet, you can use this syntax:
Code: |
define script, test cutscene, begin
suspend npcs
suspend player
set on keypress script (none)
show backdrop (10)
wait (30)
show text box (102)
wait (30)
show text box (103)
wait (30)
set on keypress script(@scriptname)
resume npcs
resume player
end
|
Where scriptname is the name of your normal on keypress script.
(We ought to put that in the docs, I think) |
Doc... umentation...? Hersey! _________________ I stand corrected. No rivers ran blood today. At least, none that were caused by us.
Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ |
|
Back to top |
|
 |
|