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

Joined: 09 May 2004 Posts: 64
|
Posted: Fri Nov 17, 2006 2:26 pm Post subject: Escape Does Game Over Script |
|
|
Hey, I'm trying to make a script that makes it so when you press escape, it goes back to the title screen, but every time I try it in-game I get a script error and hitting escape just gives you the menu. Here's the script:
Quote: | script,Menu,begin
set hero direction(me, right)
if
begin
key is pressed (01)
end
then
begin
game over
end
end |
Any help is appreciated, thanks. And yes, I did put "include, SCANCODE.hsi". |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Fri Nov 17, 2006 3:22 pm Post subject: Re: Escape Does Game Over Script |
|
|
Nintendork wrote: | Hey, I'm trying to make a script that makes it so when you press escape, it goes back to the title screen, but every time I try it in-game I get a script error and hitting escape just gives you the menu. |
You say you get a script error? What is the exact error message?
Nintendork wrote: |
Here's the script:
|
Cleaned up, it looks like:
Code: |
script,Menu,begin
set hero direction(me, right)
if(key is pressed (01))
then(game over)
end
|
...Which is very simple, and ought to just work. You may have found a bug. I am eager to see the text of your script error. I am also curious what version you are using.
Nintendork wrote: | Any help is appreciated, thanks. And yes, I did put "include, SCANCODE.hsi". |
But you never even used Key:ESC so that doesn't matter. |
|
Back to top |
|
 |
Nintendork

Joined: 09 May 2004 Posts: 64
|
Posted: Fri Nov 17, 2006 4:38 pm Post subject: |
|
|
Here's the error I'm getting:
Quote: | Script Error!
failed to unlump 1.hsx |
Using the cleaned up script doesn't seem to help. 
Last edited by Nintendork on Sat Nov 18, 2006 10:13 am; edited 1 time in total |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Nov 18, 2006 9:07 am Post subject: |
|
|
I assume you meant 1.hsx instead of hsk
One explanation would be that you've downloaded a WIP hspeak, but are attempting to play your game with Hasta-la-QB (or even an old WIP). Have you downloaded any WIP builds of anything? _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Nintendork

Joined: 09 May 2004 Posts: 64
|
Posted: Sat Nov 18, 2006 10:17 am Post subject: |
|
|
Ummm, hate to say this but, as long as I've been using this RPG maker this is the first I've heard of "WIP" builds. All I know is that I'm using Hasta-la-QB, I used hamspeak.exe for making my scripts, and that I'm using hspeak.exe to compile my scripts. |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Sat Nov 18, 2006 7:43 pm Post subject: |
|
|
Quote: | Script Error!
failed to unlump 1.hsx |
This error message means that it is trying to execute the script with ID number 1, but it is failing, because no script with that number actually exists in the file.
Can we see the entire script file? That might make it easier to figure out the problem. |
|
Back to top |
|
 |
Nintendork

Joined: 09 May 2004 Posts: 64
|
Posted: Sun Nov 19, 2006 1:45 pm Post subject: |
|
|
Quote: | include, plotscr.hsd
include, Erabound.hsi
include, SCANCODE.hsi
define script (1,Menu Start,none)
define script (2,Menu,none)
define script (3,Time In,none)
define script (4,Time Out,none)
script,Menu,begin
set hero direction(me, right)
if(key is pressed (01))
then(game over)
end
script,Menu,begin
set hero direction(me, right)
end
script,Time In,begin
swap by position (0,1)
delete hero (Hero:Cursor)
set hero direction(me, down)
end
script,Time Out,begin
swap by position (0,1)
end |
And James, just to let you know, it's hard to take you seriously when you have an avatar like that.  |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Sun Nov 19, 2006 2:21 pm Post subject: |
|
|
Code: | script,Menu,begin
set hero direction(me, right)
if(key is pressed (01))
then(game over)
end
script,Menu,begin
set hero direction(me, right)
end |
Aha! You have two scripts with the same name. One of those is supposed to be "Menu Start" |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sun Nov 19, 2006 3:27 pm Post subject: |
|
|
Oh, this is a filed bug: '' . bug_title('69') . '' (gilgamesh may be down).
Of course, the first part of that bug report won't matter very much anymore. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Nintendork

Joined: 09 May 2004 Posts: 64
|
Posted: Sun Nov 19, 2006 4:38 pm Post subject: |
|
|
...
Wow...
I am an idiot. I've looked at this script numerous times and failed to notice that... geez...
Well, thanks a lot for the help, but I still have a problem. Now when I run the game, I don't get the message anymore, but pressing escape still brings up the menu as opposed to going back to the title screen. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sun Nov 19, 2006 4:42 pm Post subject: |
|
|
You've uncovered a bug. Here's a workaround in the meantime:
Code: | script,Menu Start,begin
set hero direction(me, right)
if(key is pressed (01)) then(
suspend player
game over
)
end |
_________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Nintendork

Joined: 09 May 2004 Posts: 64
|
Posted: Sun Nov 19, 2006 4:49 pm Post subject: |
|
|
Actually, that doesn't work, it still just brings up the menu. |
|
Back to top |
|
 |
Kizul Emeraldfire Type: Cyber Dragoon

Joined: 26 Mar 2004 Posts: 229
|
Posted: Sun Dec 10, 2006 11:49 pm Post subject: |
|
|
I also found this to be a problem, but I made my own work around for it. I just read this thread and thought that it could help you. :D
First, I made a script called 'gaem over' — the reason being because 'game over' was already taken by Plotscr.hsd. Anyway, below is the gaem over script:
Code: | script, gaem over, begin
suspend player
fade screen out
wait
show backdrop (13) # this is just an all-black backdrop — change the [i]13[/i] to whatever you want.
wait
fade screen in
wait
game over
resume player
end |
Now all you have to do is put:
Code: | if (key is pressed (01)) then (gaem over) |
Into an OnKeyPress script, and you're good to go. :D
Hope this helps. ^_^ |
|
Back to top |
|
 |
|