Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

My first plotscript

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Pumpkinbot
Rock beats scissors! >:D




Joined: 22 Apr 2009
Posts: 106
Location: Megaman, Cutman's level.

PostPosted: Fri Nov 13, 2009 8:01 pm    Post subject: My first plotscript Reply with quote

It's a really simple game over script. Is it any good and will it work?
Code:
plotscript,you lost the game,begin
show text box(0)
wait for key(anykey)
gameover
end

EDIT: Also, I have a slight problem. I was editing the text in text box 0, the box to appear when you lose, and it was going to say "Though ${C0} put up a good fight, in the end, he lost..." However, at least two of the characters will be girls. Then, it should say "she lost". I'm pretty sure I could add something on to this to check if hero 1, 3, etc. (the girls) are the leader and, if so, set it to say "she" or, if not, set it to say "he". Trivial, yeah, but still, I know it can be done.
Back to top
View user's profile Send private message
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Fri Nov 13, 2009 8:46 pm    Post subject: Reply with quote

You probably want "wait for textbox" instead of "wait for key."

Other than that, it looks fine.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Fri Nov 13, 2009 9:32 pm    Post subject: Reply with quote

You can embed plotstrings into textboxes too. You could have a script something like this

Code:

plotscript, update gender pronouns, begin
  variable(female)
  if(check tag(tag:Alice is leader)) then(female := true)
  if(check tag(tag:Luna is leader)) then(female := true)
  if(female) then(
    $3="she"
    $4="her"
  )else(
    $3="he"
    $4="his"
  )
end


Then you can write your textbox to say:

"Though ${C0} put up a good fight, in the end, ${S3} lost..."

And you can do the same thing any other place where you need a gendered pronoun.

Although I almost think I should make this sort of thing a built-in feature...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Pumpkinbot
Rock beats scissors! >:D




Joined: 22 Apr 2009
Posts: 106
Location: Megaman, Cutman's level.

PostPosted: Fri Nov 13, 2009 9:57 pm    Post subject: Reply with quote

James Paige wrote:
You can embed plotstrings into textboxes too. You could have a script something like this

Code:

plotscript, update gender pronouns, begin
  variable(female)
  if(check tag(tag:Alice is leader)) then(female := true)
  if(check tag(tag:Luna is leader)) then(female := true)
  if(female) then(
    $3="she"
    $4="her"
  )else(
    $3="he"
    $4="his"
  )
end


Then you can write your textbox to say:

"Though ${C0} put up a good fight, in the end, ${S3} lost..."

And you can do the same thing any other place where you need a gendered pronoun.

Although I almost think I should make this sort of thing a built-in feature...
*headdesk* I didn't even think of checking for tags. Raspberry!
EDIT: After fiddling around and trying to figure out how to work HamsterSpeak.exe and getting a funny error message in the OHRRPGCE editor*, I finally managed to figure out how to insert it. I put it in a .txt file and dragged the file to HSpeak.exe, but I got an error. It says...
ERROR: in line 1 of [path]
plotscript, update gender pronouns, begin
Expected top-level declaration but found plotscript

Nothing looked wrong in the script to me. :S

*What I did was I made a text file with the script in it, but I saves it as .hs and tried importing it, but I got an error message. It said...
[Path] is not really a compiled .hs file. Did you create it by compiling a script file with hspeak.exe, or did you just give your script a name that ends in .hs and hoped it would work? Use hspeak.exe to create a real .hs file.
Back to top
View user's profile Send private message
NeoSpade
Of course!




Joined: 23 Sep 2008
Posts: 249
Location: Wales GB

PostPosted: Sat Nov 14, 2009 1:24 am    Post subject: Reply with quote

I've only every got that error message when I've compiled scripts without include plotsrc.hsd and include whatevergame.hsi, are you sure that they're both there or?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Pumpkinbot
Rock beats scissors! >:D




Joined: 22 Apr 2009
Posts: 106
Location: Megaman, Cutman's level.

PostPosted: Sat Nov 14, 2009 2:13 pm    Post subject: Reply with quote

NeoSpade wrote:
I've only every got that error message when I've compiled scripts without include plotsrc.hsd and include whatevergame.hsi, are you sure that they're both there or?
*checks* They're both there.
Back to top
View user's profile Send private message
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Sat Nov 14, 2009 6:21 pm    Post subject: Reply with quote

Post your entire file.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Pumpkinbot
Rock beats scissors! >:D




Joined: 22 Apr 2009
Posts: 106
Location: Megaman, Cutman's level.

PostPosted: Sat Nov 14, 2009 7:00 pm    Post subject: Reply with quote

Moogle1 wrote:
Post your entire file.
What file? The script that I want to put in the game? James posted it. *points up*

Also, I tried my "game over" script, and it, too, got that error message.
Back to top
View user's profile Send private message
Guest







PostPosted: Sat Nov 14, 2009 7:22 pm    Post subject: Reply with quote

Not sure if this is what is going on or not, but all of your scripts probably ought to be in one big text file, like so:

Code:
include, plotscr.hsd
include, MY_GAME'S_NAME.hsi

plotscript, you lost the game, begin

#stuff

end


plotscript, update gender pronouns, begin

#stuff

end

#etc...
Back to top
Pumpkinbot
Rock beats scissors! >:D




Joined: 22 Apr 2009
Posts: 106
Location: Megaman, Cutman's level.

PostPosted: Sat Nov 14, 2009 8:03 pm    Post subject: Reply with quote

Anonymous wrote:
Not sure if this is what is going on or not, but all of your scripts probably ought to be in one big text file, like so:

Code:
include, plotscr.hsd
include, MY_GAME'S_NAME.hsi

plotscript, you lost the game, begin

#stuff

end


plotscript, update gender pronouns, begin

#stuff

end

#etc...
Ah. Now it works. Just got to change a few things. Thanks, anonymous guest! Big grin

EDIT: I put all the plotscripts in the .txt file like Guest said (how could you address an unnamed guest?), and it said it worked, but, when I go to change the gameover script in the general game data, it says there's no scripts. Halp?
EDIT2: Never mind. In the directory where I kept the .txt file with all the scripts (called HS Scripts.txt), there's now a file called HS Scripts.hs. Big grin I DO IT RITE.
EDIT3: When should the game run the updategenderpronouns script?
Back to top
View user's profile Send private message
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Sat Nov 14, 2009 10:16 pm    Post subject: Reply with quote

Hm, well Guest was me. I don't bother going through the login process half the time if I'm just posting help.

You should run the updategender script anytime the party members had a chance of changing their lineup. This will be a lot if the player can change the order of their party through the main menu. It might be best to disable the use of ALT and ESC to close the main menu, and make a new menu option that calls the updategender script and also closes the main menu.
_________________
My first completed OHR game, Tales of the New World:
http://castleparadox.com/gamelist-display.php?game=161

This website link is for my funk/rock band, Euphonic Brew:
www.euphonicbrew.com
Back to top
View user's profile Send private message Visit poster's website
Pumpkinbot
Rock beats scissors! >:D




Joined: 22 Apr 2009
Posts: 106
Location: Megaman, Cutman's level.

PostPosted: Sat Nov 14, 2009 11:23 pm    Post subject: Reply with quote

msw188 wrote:
Hm, well Guest was me. I don't bother going through the login process half the time if I'm just posting help.

Well, then thank you for the help. Big grin

msw188 wrote:
You should run the updategender script anytime the party members had a chance of changing their lineup. This will be a lot if the player can change the order of their party through the main menu.

That's what I was thinking. That's gonna be a loooot of times. D:

msw188 wrote:
It might be best to disable the use of ALT and ESC to close the main menu, and make a new menu option that calls the updategender script and also closes the main menu.

Yeah, but that would get annoying, not being able to unpause with ease.
Back to top
View user's profile Send private message
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Sun Nov 15, 2009 11:52 am    Post subject: Reply with quote

You're welcome.

You could also have a general script that wraps showing a text box with the 'update gender' script. Then any NPC would need to be assigned to call this script and pass the textbox number as an argument. Also anywhere in a plotscript where you would have used "show text box (num)", you should use this script instead.
_________________
My first completed OHR game, Tales of the New World:
http://castleparadox.com/gamelist-display.php?game=161

This website link is for my funk/rock band, Euphonic Brew:
www.euphonicbrew.com
Back to top
View user's profile Send private message Visit poster's website
Pumpkinbot
Rock beats scissors! >:D




Joined: 22 Apr 2009
Posts: 106
Location: Megaman, Cutman's level.

PostPosted: Sun Nov 15, 2009 1:12 pm    Post subject: Reply with quote

msw188 wrote:
You're welcome.

You could also have a general script that wraps showing a text box with the 'update gender' script. Then any NPC would need to be assigned to call this script and pass the textbox number as an argument. Also anywhere in a plotscript where you would have used "show text box (num)", you should use this script instead.
I see. Thanks! Big grin
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group