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

Alas, how many times will keyval be explained?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
msw188




Joined: 02 Jul 2003
Posts: 1041

PostPosted: Sun Feb 24, 2008 10:45 am    Post subject: Alas, how many times will keyval be explained? Reply with quote

Okay, my little brother has experienced trouble with a part of my game where leaving a shop (by pressing SPACE or CTRL on the option 'leave') immediatelly reactivates the NPC and goes back to the shop. These are NOT normal shops, they are plotscripted. I don't see this behavior on my computer very much, might have something to do with speed of computer? Anyway, I have a script that the NPC triggers that sets up the shop. Would the following be the correct way to handle the situation?:

Code:

plotscript, Enter Shop, whichmenu=0, begin

if(keyval(key:space)>>1, or, same for CTRL and ENTER),then
  begin    #THIS IS WHAT I AM CONSIDERING ADDING, BASED ON PLOTDICT

suspendplayer
suspendnpcs
gShop:=whichmenu
variable(i)
i:=openmenu(whichmenu)
get menuitem caption(first menuitem(i),5)  #string 5 is the shop name!!!
closemenu(i)
swtextbox(177)   #WELCOME TO SHOP
i:=openmenu(menu:EnterShop)
set menuitem caption(first menuitem(i),5)
show money string

  end   #END OF NEW IF

end

_________________
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
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Tue Feb 26, 2008 11:30 pm    Post subject: Reply with quote

Yes, that's the way to use it. Just try it and see if it works. keyval doesn't really have any other use, and we should probably provide a wrapper, named... I hate this bit.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Inferior Minion
Metric Ruler



Joined: 03 Jan 2003
Posts: 741
Location: Santa Barbara, CA

PostPosted: Tue Feb 26, 2008 11:44 pm    Post subject: Reply with quote

The Mad Cacti wrote:
Yes, that's the way to use it. Just try it and see if it works. keyval doesn't really have any other use, and we should probably provide a wrapper, named... I hate this bit.


I don't know, TMC.

Code:
if(i hate this bit(key:space))


...just doesn't read as well...
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Tue Feb 26, 2008 11:57 pm    Post subject: Reply with quote

Well if the bit were just one position to the right, we wouldn't need a wrapper!
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
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