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

Something strange in the script
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Fri Jun 02, 2006 9:38 pm    Post subject: That's a good think to know! Reply with quote

Ok! I will work some more on the code... I've read on the wiki that the "show load menu" has been implemented but not officially.

Could somoene make a little guideline and explain how to use this command with tirgoviste? (Expect if a new version of the OhrRpgCe is going to be realeased within next month)

Thanks in advance!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Sun Jun 04, 2006 12:36 am    Post subject: Next problem! Reply with quote

Please do not pay attention to the previous because I got the piece of information I needed. Anyway here is another problem

I've changed my code a little bit so that the key is pressed became unactive will the tag is turned on but when I test it the player can still press the key. It seems that a end, else, begin would be appropriate but I don't know how to combine the commands

Does somoene has any idea why ?

Code:


if ( (key is pressed(key: r),and, (check tag (tag:keyboard locked)==ON) ) then, begin
my keyboard jump
end
#Key is pressed r pour sauter



As always thanks for the help!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Sun Jun 04, 2006 7:25 am    Post subject: Reply with quote

Try changing the "ON" to "OFF"

"if R is pressed and the keyboard is not locked, then:"
_________________
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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
LeRoy_Leo
Project manager
Class S Minstrel



Joined: 24 Sep 2003
Posts: 2683
Location: The dead-center of your brain!

PostPosted: Mon Jun 05, 2006 7:49 am    Post subject: Reply with quote

We could disregard the first post, but we had to read it anyway, right?
Er- unless someone reads this topic backwards, the damage is done and ten seconds goes out the window... So next time, use the edit button, my good chum. ^^

I am glad you could resolve that issue.
_________________
Planning Project Blood Summons, an MMORPG which will incinerate all of the others with it's sheer brilliance...

---msw188 ---
"Seriously James, you keep rolling out the awesome like gingerbread men on a horror-movie assembly line. "
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Sun Jun 11, 2006 11:25 am    Post subject: I've made some tests and... Reply with quote

I've tried to change the tag ON to OFF but when I turn the tag on (using a text box and npc) the if key is pressed is still valid....

May be the code should be modified so that something happens if the first conditions are not valid.... Does somoene any suggestions for improvement?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Tue Jun 20, 2006 12:30 am    Post subject: Once more I... Reply with quote

I managed to solve the tag problem. Hourra!

But I came up with another problem. Reading the article I've posted about game start options on the wiki at
http://www.hamsterrepublic.com/ohrrpgce/index.php/How_do_I_make_title_options_like_Start_Game,_Continue_Game,_etc.html

and making test I realised that I problem in keeping on screen text boxes. Could somoene explain the various ways on making display a text and then keep it on screen?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Tue Jun 20, 2006 2:28 pm    Post subject: Reply with quote

That's easy. If you use "suspend box advance", suddenly the player can't press space to advance the text box anymore. Be sure to use "resume box advance" when you're done.

However, unless you know exactly what you're doing and/or getting into, do not have a script that does anything like this:

Code:
suspend box advance
show text box(523)
wait for textbox


It will freeze the engine, and prevent anything from doing anything.

(Actually, you could put this to effect, if you wanted the hero to walk around and do stuff while the text box was showing, and some other npc/script advances the text box, allowing the first script to continue. However, if any of this sounds confusing, then just don't do it.)
_________________
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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Sun Jun 25, 2006 8:21 pm    Post subject: Could somoene tell me how... Reply with quote

Mike Caron wrote:

Quote:

suspend box advance
show text box(523)
wait for text box


I didn't know that it was possible to use the wait for text box command as the box advance is suspended. It's an interesting thing to know. Raspberry!

Could somoene tell me how to make disappear a text box from the screen using plotscripting. Here is what I would like to do

Code:

suspend box advance
show text box(523)
wait (3)
advance text box
show text box(526)
wait (3)
advance text box
show text box(531)
wait (3)
advance text box
resume box advance


In the example above, text boxes appears one after another but I would text box 531 not to be on screen anymore as the script ends.

So? How am I supposed to do that ?
As always thanks very much for the help!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Mon Jun 26, 2006 3:59 am    Post subject: Reply with quote

Well, by "after the script ends", do you mean immediately after the "resume box advance"? Because, you'll have to add a wait(1) to do that. If you mean after the whole script it over and done with, then the script should work as is.
_________________
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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Tue Jun 27, 2006 10:21 pm    Post subject: buggie scripts... or may be not Reply with quote

Thanks once more to Mike Caron for answering! I wanted the
text box to disappear after the "resume box advance", and wait(1)
was exactly what I needed.

Now that's turn to help or at least try to. As resquested in the
wiki chats, here are the scripts that make appears error "illegal wait statement #174"


Code:

#--------------------------------------------------------------------
script, launch game, begin

suspend player
suspend npcs
 
 set hero picture (me, 0)
 wait for hero (me)
 teleport to map (20, 1, 2)
 show backdrop (4)
 lock hero(me)
 wait (30)
 show backdrop (3)
 wait (35)

 fade screen out (63,63,63) 
 show backdrop (2)
 wait (35) 
 
 show text box (283)
 fade screen in
 
resume player
resume npcs

end #end of plotscript
#-----------------------------------------------------------------------------
#In the script you can choose a new game... or not

script, new game2, begin 

if (check tag (tag: new game)==ON) then, begin
 #game start if there are no previous slots
fade screen out (0,0,0)
stop song
show backdrop (9)
wait (2)
introduction1
fade screen in
end

if (check tag (tag: new game)==OFF) then, begin
#game starts previous save slot loaded
show text box (283) # text box with option new game and continue
wait for text box
stop song
fade screen out (0,0,0)

#ILLEGAL WAIT STATEMENT #174 HERE #ILLEGAL WAIT STATEMENT #174 HERE.
load from slot (1)

#As James explained illegal wait #174 is linked with the
# load from slot command. That is why we can be sure the bug is here.

fade screen in
show map
resume player
resume npcs
unlock hero (me)

else, begin
wait(2)
end
end #end of the if check tag

end# end of the plotscript
#--------------------------------------------------------------



Good luck in solving bug #203 !
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Battleblaze
Warrior Thread Monk




Joined: 19 Dec 2003
Posts: 782
Location: IndY OHR

PostPosted: Thu Jun 29, 2006 10:47 am    Post subject: Reply with quote

Biz are you ever gonna make a game? You ask more plotscripting questions than anyone on the board. I just want to know what you have planned for thread after thread of hard work.
_________________
Indy OHR! and National OHR Month Contest going on now!

"Aeth calls PHC an anti-semite; PHC blames anti-semitism"
-squall
Back to top
View user's profile Send private message Visit poster's website AIM Address
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Fri Jun 30, 2006 10:11 am    Post subject: Reply with quote

Your 'end' commands near the bottom of the script are incorrectly placed. I have bolded and underlined (I think) the end that I believe should be moved:


Code:

if (check tag (tag: new game)==OFF) then, begin
#game starts previous save slot loaded
show text box (283) # text box with option new game and continue
wait for text box
stop song
fade screen out (0,0,0)

#ILLEGAL WAIT STATEMENT #174 HERE #ILLEGAL WAIT STATEMENT #174 HERE.
load from slot (1)

#As James explained illegal wait #174 is linked with the
# load from slot command. That is why we can be sure the bug is here.

fade screen in
show map
resume player
resume npcs
unlock hero (me)

#THE BOLD AND UNDERLINED (and BAD) END BELOW SHOULD BE HERE!!!!!!!

else, begin
wait(2)
end
[b][u]end #end of the if check tag[/u] [/b]  #<--------------**BAD**

end# end of the plotscript


This is because you have to end your 'if' block BEFORE you begin your 'else' block. Do you see?

PS: I'm not sure if this will fix the illegal wait problem, but it will make the compiler much happier, I believe.

EDIT: Okay, apparently the bold and underline don't work in the code part, so I put an arrow by that part as well.
Back to top
View user's profile Send private message Visit poster's website
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Fri Jun 30, 2006 11:58 pm    Post subject: Thanks! Reply with quote

Thanks to Msw188 for highlighting the problem. Anyway I post the script to help to solve #bug 203 which I fortunatelly don't have anylonger in my games.

Feel free to use the code I've posted to try to produce an #illegal wait statement 174 and try to find a solution to this bug.

Why did I post the code here? Well my grammar is rather buggy and I didn't feel like posting it on bugzilla as I wasn't sure that It was a real bug.

Battleblaze said

Quote:
Biz are you ever gonna make a game? You ask more plotscripting questions than anyone on the board. I just want to know what you have planned for thread after thread of hard work.


Well my game goes rather well. I'm actually working on the backdrops and the music. You can have info on my game at : http://sailormoon4eternity.site.voila.fr/

As I'm waiting for the "show load menu" command to be added in the plotscript dictionnary, the game won't be avialable for download for a certain time.

As always thanks for the help to everyone! Good luck on making your games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Sat Jul 01, 2006 8:35 am    Post subject: Re: Thanks! Reply with quote

bis_senchi wrote:
Thanks to Msw188 for highlighting the problem. Anyway I post the script to help to solve bug 203 which I fortunatelly don't have anylonger in my games.

Feel free to use the code I've posted to try to produce an #illegal wait statement 174 and try to find a solution to this bug.

Why did I post the code here? Well my grammar is rather buggy and I didn't feel like posting it on bugzilla as I wasn't sure that It was a real bug.


Yes, it'a bug. There should be no way to get an illegal wait statement error with any script, no matter how buggy. And, we already have a bug open for it.

bis_senchi wrote:
Battleblaze said

Quote:
Biz are you ever gonna make a game? You ask more plotscripting questions than anyone on the board. I just want to know what you have planned for thread after thread of hard work.


Well my game goes rather well. I'm actually working on the backdrops and the music. You can have info on my game at : http://sailormoon4eternity.site.voila.fr/

As I'm waiting for the "show load menu" command to be added in the plotscript dictionnary, the game won't be avialable for download for a certain time.

As always thanks for the help to everyone! Good luck on making your games!


The show load menu command is in a nightly build (and has been for a great long while), and is in the plotscripting dictionary there. Feel free to use it at any point.
_________________
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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Sun Jul 02, 2006 3:44 am    Post subject: And once more... Reply with quote

I am using the following script to try to make appear the load menu (the menu with 4 save slots that pops up when a game launch )

Code:


  Global variable (16, show load menu)

#--------------------------------------------
define script, show load menu, begin
show load menu:=true

while (show load menu)do, begin
variable(slot)
slot:= show load menu
if(slot == -1) then, begin

  #they canceled
end, else, begin
 load from slot (slot)
  #slot contains the save slot they chose.
end

show load menu:=false
wait (2)
end #end of the while loop

end #end of the plotscript
#--------------------------------------------



When I try it is as if I was using a simple load from slot command. Any suggestions and remarks are more than welcomed.

Anyway, Mike Caron wrote:
Quote:

The show load menu command is in a nightly build (and has been for a great long while), and is in the plotscripting dictionary there. Feel free to use it at any point.


Could you give more details about how to use a nightly build?

Thanks as always from help and constructive criticism. Sorry for posting once more a message in a so little time. Feel free to tell me by posting on this forum if the code I've posted helps to reproduce the bug.

Good luck in making your games!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
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