| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| Pumpkinbot Rock beats scissors! >:D
 
 
 
  
 Joined: 22 Apr 2009
 Posts: 106
 Location: Megaman, Cutman's level.
 
 | 
			
				|  Posted: Fri Nov 13, 2009 8:01 pm    Post subject: My first plotscript |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Moogle1 Scourge of the Seas
 Halloween 2006 Creativity Winner
 
  
 
  
 Joined: 15 Jul 2004
 Posts: 3377
 Location: Seattle, WA
 
 | 
			
				|  Posted: Fri Nov 13, 2009 8:46 pm    Post subject: |   |  
				| 
 |  
				| You probably want "wait for textbox" instead of "wait for key." 
 Other than that, it looks fine.
 _________________
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Bob the Hamster OHRRPGCE Developer
 
 
 
  
 Joined: 22 Feb 2003
 Posts: 2526
 Location: Hamster Republic (Southern California Enclave)
 
 | 
			
				|  Posted: Fri Nov 13, 2009 9:32 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Pumpkinbot Rock beats scissors! >:D
 
 
 
  
 Joined: 22 Apr 2009
 Posts: 106
 Location: Megaman, Cutman's level.
 
 | 
			
				|  Posted: Fri Nov 13, 2009 9:57 pm    Post subject: |   |  
				| 
 |  
				| *headdesk* I didn't even think of checking for tags. 	  | 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...
 | 
   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 |  | 
	
		|  | 
	
		| NeoSpade Of course!
 
 
 
  
 Joined: 23 Sep 2008
 Posts: 249
 Location: Wales GB
 
 | 
			
				|  Posted: Sat Nov 14, 2009 1:24 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Pumpkinbot Rock beats scissors! >:D
 
 
 
  
 Joined: 22 Apr 2009
 Posts: 106
 Location: Megaman, Cutman's level.
 
 | 
			
				|  Posted: Sat Nov 14, 2009 2:13 pm    Post subject: |   |  
				| 
 |  
				| *checks* They're both there. 	  | 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? | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Moogle1 Scourge of the Seas
 Halloween 2006 Creativity Winner
 
  
 
  
 Joined: 15 Jul 2004
 Posts: 3377
 Location: Seattle, WA
 
 | 
			
				|  Posted: Sat Nov 14, 2009 6:21 pm    Post subject: |   |  
				| 
 |  
				| Post your entire file. _________________
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Pumpkinbot Rock beats scissors! >:D
 
 
 
  
 Joined: 22 Apr 2009
 Posts: 106
 Location: Megaman, Cutman's level.
 
 | 
			
				|  Posted: Sat Nov 14, 2009 7:00 pm    Post subject: |   |  
				| 
 |  
				| What file? The script that I want to put in the game? James posted it. *points up* 	  | Moogle1 wrote: |  	  | Post your entire file. | 
 
 Also, I tried my "game over" script, and it, too, got that error message.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Guest 
 
 
 
 
 
 
 
 | 
			
				|  Posted: Sat Nov 14, 2009 7:22 pm    Post subject: |   |  
				| 
 |  
				| 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.
 
 | 
			
				|  Posted: Sat Nov 14, 2009 8:03 pm    Post subject: |   |  
				| 
 |  
				| Ah. Now it works. Just got to change a few things. Thanks, anonymous guest! 	  | 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...
 | 
 | 
   
 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.
  I DO IT RITE. EDIT3: When should the game run the updategenderpronouns script?
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| msw188 
 
 
 
 Joined: 02 Jul 2003
 Posts: 1041
 
 
 | 
			
				|  Posted: Sat Nov 14, 2009 10:16 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Pumpkinbot Rock beats scissors! >:D
 
 
 
  
 Joined: 22 Apr 2009
 Posts: 106
 Location: Megaman, Cutman's level.
 
 | 
			
				|  Posted: Sat Nov 14, 2009 11:23 pm    Post subject: |   |  
				| 
 |  
				|  	  | 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.
   
 
  	  | 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 |  | 
	
		|  | 
	
		| msw188 
 
 
 
 Joined: 02 Jul 2003
 Posts: 1041
 
 
 | 
			
				|  Posted: Sun Nov 15, 2009 11:52 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Pumpkinbot Rock beats scissors! >:D
 
 
 
  
 Joined: 22 Apr 2009
 Posts: 106
 Location: Megaman, Cutman's level.
 
 | 
			
				|  Posted: Sun Nov 15, 2009 1:12 pm    Post subject: |   |  
				| 
 |  
				| I see. Thanks! 	  | 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.
 | 
  |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |