View previous topic :: View next topic |
Author |
Message |
PK-Gamer Currently making an RPG

Joined: 11 Jan 2013 Posts: 23 Location: MD
|
Posted: Fri Jan 18, 2013 10:35 am Post subject: Need help on a couple of things |
|
|
Hi all,
Two things I need assistance in. Is there a way to skip wait time in a script? For example, I have scripts that have dialogue in which the player must wait a couple of ticks for the next box to appear. Is there a way for the player to skip the wait time or skip a cutscene that will activate the flags that are in the script?
Also, is there a way to change the positions of the shop boxes? I want to move the boxes that have the player's current money and how much an item cost for the player so that it would be easier for the player to know how much they have and how much they need to pay for an item. |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Fri Jan 18, 2013 10:45 am Post subject: Re: Need help on a couple of things |
|
|
Welcome PK-Gamer!
Out of curiosity, what does the PK stand for? We used to have a PK-Fortis around here, but I can't remember what his PK stood for :)
PK-Gamer wrote: | Two things I need assistance in. Is there a way to skip wait time in a script? For example, I have scripts that have dialogue in which the player must wait a couple of ticks for the next box to appear. Is there a way for the player to skip the wait time or skip a cutscene that will activate the flags that are in the script? |
There are ways to skip waits, but the best method probably depends on what you want to accomplish. Do you want specific individual waits in a cutscene to be skipped by pressing a key? Or you do you want to let the user press a key and skip the rest of the cutscene? (or maybe press a key and fast-forward through a cutscene?)
PK-Gamer wrote: | Also, is there a way to change the positions of the shop boxes? I want to move the boxes that have the player's current money and how much an item cost for the player so that it would be easier for the player to know how much they have and how much they need to pay for an item. |
Unfortunately there is no way to do that currently. I know what you are talking about though. The positioning of the price and the current money is somewhat confusing.
There is a plan to add more shop layout customization to a future version, but I can't guess how long it will take to accomplish. |
|
Back to top |
|
 |
PK-Gamer Currently making an RPG

Joined: 11 Jan 2013 Posts: 23 Location: MD
|
Posted: Fri Jan 18, 2013 1:59 pm Post subject: |
|
|
Hi Bob,
The PK in my name is related to EarthBound Zero if you played it (PK-Fire, PK-Freeze, PK-Thunder).
Also, thank you for responding to my question. Yes, I would like the user to press a button to fast forward through a cutscene and skip a cutscene with tags being activated after the cutscene finishes. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Jan 19, 2013 3:59 am Post subject: |
|
|
I believe the PK in PK-Fortis' username were the initials of a nickname he'd previously used.
---
Skipping the rest of a script unfortunately isn't entirely straightforward. If you only use "wait" commands and don't move the heroes or NPCs, then it's fairly easy though. Let's say that you want the rest of the scene to be skipped when the player presses esc, enter, or space. First, add a global variable to indicate the scene is being skipped.
Code: | global variable(1, skipping waits) |
Then use the following replacement for 'wait', which causes not just the one wait to be skipped, but also all the following ones:
Code: | script, skippable wait, ticks, begin
while (skipping waits == false && ticks >> 0) do (
wait (1)
ticks -= 1
if (key is pressed(key:esc) || key is pressed(key:enter) || key is pressed(key:space)) then (
skipping waits := true
)
)
end |
Then write your cutscene script as normal, but remember to reset the "skipping waits" global at the beginning, and write "skippable wait" instead of "wait". Eg:
Code: | plotscript, a scene, begin
skipping waits := false
show text box(5)
skippable wait(40)
advance textbox
skippable wait(20)
...
# whatever other effects you want to have
set tag(tag:seen the scene, on)
end |
If you use other wait commands (like wait for key) then those have to have replacements too. Just ask. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
PK-Gamer Currently making an RPG

Joined: 11 Jan 2013 Posts: 23 Location: MD
|
Posted: Sat Jan 19, 2013 6:33 am Post subject: |
|
|
Thank you for your help, TMC.
However, when I try to compile my script. It gives me an error.
script, skippable wait, ticks, begin
script skippablewait has 1 arguments named, but has 0 arguments in its
declaration.
Last edited by PK-Gamer on Sat Jan 19, 2013 1:32 pm; edited 1 time in total |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Sat Jan 19, 2013 8:32 am Post subject: |
|
|
You didn't add a "declare script" for it, did you? Declare script is obsolete and should not be used at all. |
|
Back to top |
|
 |
PK-Gamer Currently making an RPG

Joined: 11 Jan 2013 Posts: 23 Location: MD
|
Posted: Sat Jan 19, 2013 1:35 pm Post subject: |
|
|
Bob the Hamster wrote: | You didn't add a "declare script" for it, did you? Declare script is obsolete and should not be used at all. |
Actually, no.
What I do first is this
define script(80,skippable wait,none)
To define the new script
Then I do this...
script, skippable wait, ticks, begin
(Actions to be done for the script) |
|
Back to top |
|
 |
sotrain515
Joined: 17 May 2010 Posts: 39 Location: Connecticut
|
Posted: Sat Jan 19, 2013 5:26 pm Post subject: |
|
|
PK-Gamer wrote: |
define script(80,skippable wait,none)
|
This is what Bob meant by "declare script". You don't need to do this at all anymore, just delete it and leave the second part. |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Sat Jan 19, 2013 7:00 pm Post subject: |
|
|
Yes, sorry, I typed "declare" when I meant "define"
PK-Gamer, did you read an old tutorial somewhere that said to use "define script"? I thought I had found and updated all the tutorials on the wiki that used to use "define script" |
|
Back to top |
|
 |
PK-Gamer Currently making an RPG

Joined: 11 Jan 2013 Posts: 23 Location: MD
|
Posted: Sat Jan 19, 2013 8:00 pm Post subject: |
|
|
Thanks guys!
Actually Bob, I got the "define scripts" from the scripts that came from the Vikings of Midgard game that comes with OHRRPGCE when I first used OHRRPGCE. |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Jan 19, 2013 8:35 pm Post subject: |
|
|
Ugh! The scripts for Vikings are absolutely horrible and have misled many people. I would like to clean up the scripts and demand that Fenrir uses *our* version of them henceforth.
However, even if they were cleaned up they would not be a good example to learn from. They are simply too long and boring. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
PK-Gamer Currently making an RPG

Joined: 11 Jan 2013 Posts: 23 Location: MD
|
Posted: Sun Jan 20, 2013 9:12 am Post subject: |
|
|
There's another problem I'm having now...
When I skip through a script that includes adding a new character and equipping an item to the character, it seems it give me an error about that the force equip event cannot work. |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Sun Jan 20, 2013 11:15 am Post subject: |
|
|
Can you post the script that has the problem? |
|
Back to top |
|
 |
PK-Gamer Currently making an RPG

Joined: 11 Jan 2013 Posts: 23 Location: MD
|
Posted: Sun Jan 20, 2013 1:50 pm Post subject: |
|
|
Bob the Hamster wrote: | Can you post the script that has the problem? |
Actually,
I just fixed the problem. Sorry about that.  |
|
Back to top |
|
 |
Sparoku Pyrithea Amethyst.

Joined: 02 Feb 2004 Posts: 467 Location: Washington State
|
Posted: Thu Mar 14, 2013 12:26 am Post subject: |
|
|
Bob the Hamster wrote: | Yes, sorry, I typed "declare" when I meant "define"
PK-Gamer, did you read an old tutorial somewhere that said to use "define script"? I thought I had found and updated all the tutorials on the wiki that used to use "define script" |
That's not used anymore?
Looks like I might have to re-learn plot-scripting format if I decide to ever make a game again.  _________________ "There will always be people who will tell you they hate what you made, or like what you made, and will tell you that what you did was wrong or right."
My Discord ID: SparDanger#0305 |
|
Back to top |
|
 |
|