Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > Zelaron Gaming > RPGMaker

 
 
Thread Tools Display Modes

 
Shop questions
Reply
Posted 2004-06-01, 07:51 PM
may sound noobish, but I've had a good idea for some time now....the idea is that you go to a shop and you say buy or whatever....and then a screen shows you the item you are buying...then you can move left and right to buy and stuf....etc. etc.....so can anyone help me on this? I've got the images but i just need the coding...

thanks
Old
Profile PM WWW Search
Fledge193 is neither ape nor machine; has so far settled for the in-betweenFledge193 is neither ape nor machine; has so far settled for the in-between
 
Fledge193
 



 
Reply
Posted 2004-06-02, 06:07 AM in reply to Fledge193's post "Shop questions"
Why not just use the default shop? That said, I don't know what the setup is going to be like (just one item on the screen at a time? Or a few?) and how big the items basically are.

---------------------------

With just one, it's a bit easier to set up. You just need to display the first picture at whatever coordinates you want, and capture the keys that the player is going to need - namely left, right, cancel, and enter. You then just change the one picture accordingly, based on whatever item you're on.

PSEUDOCODE:

<>Display picture of item (probably with price right on the picture)
<>Set variable [0055:ItemNumber] to 1
<>Start Loop
___<>Key input processing -> [0001:KeyCaptured]
___<>Comment: -----------------------------------------------
___<>Branch if Var [0001:KeyCaptured] is 2 (Left Key)
______<>ItemNumber = ItemNumber - 1
______<>
___:End
___<>Comment: -----------------------------------------------
___<>Branch if Var [0001:KeyCaptured] is 3 (Right Key)
______<>ItemNumber = ItemNumber + 1
______<>
___:End
___<>Comment: -----------------------------------------------
___<>Branch if Var [0001:KeyCaptured] is 5 (OK Key)
______<>Comment:------
______<>Comment: Buying Subroutine Goes Here
______<>Comment: Check for amount of gold, add +1 item based on
______<>Comment: ItemNumber variable, take away gold, then continue
______<>Comment: ------
___:End
___<>Comment: -----------------------------------------------
___<>Branch if Var [0001:KeyCaptured] is 6 (Cancel Key)
______<>Break out of loop
______<>
___:End
___<>Comment:-------The Part Below "wraps" the item list around-----
___<>Branch if Var [0055:ItemNumber] is 0
______<> ItemNumber = Maximum number of items
______<>
___:End
___<>Branch if Var [0055:ItemNumber] > Maximum Items
______<> ItemNumber = 1
______<>
___:End
___<>Comment:-----Picture changes happen here, add how many you need-----
___<>Comment:---Yes, picture will "change" even if you buy something instead---
___<>Comment ---of moving (of course, it will "change" to the same item thing)---
___<>Branch if ItemNumber = 1
______<>Change picture to "Potion"
______<>
___:End
___<>Branch if ItemNumber = 2
______<>Change picture to "Sword"
______<>
___:End
___<>Branch if ItemNumber = 3
______<>Change picture to "Shield"
______<>
___:End
___<>
:End (Loop)

----------------------------------------

I just threw that together. I'll have to do more when I get home..
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Reply
Posted 2004-06-02, 05:42 PM in reply to BlueCube's post starting "Why not just use the default shop? ..."
well put it this way:

I want to have you go to a guy....select buy from the guy....then it will go to a screen

That sceen will show, let's say, a shield (picture). It will have a button that says buy
left and right.......select left/right it will go to next/previous shield/weapon and buy...adds the item and takes away that much gold....like that....when you press ESC it will exit......is that possible?


The code you showed me MIGHT work...i'll have to try it out later
Old
Profile PM WWW Search
Fledge193 is neither ape nor machine; has so far settled for the in-betweenFledge193 is neither ape nor machine; has so far settled for the in-between
 
Fledge193
 



 
Reply
Posted 2004-06-03, 01:40 PM in reply to Fledge193's post starting "well put it this way: I want to have..."
Fledge193 said:
well put it this way:

I want to have you go to a guy....select buy from the guy....then it will go to a screen

That sceen will show, let's say, a shield (picture). It will have a button that says buy
left and right.......select left/right it will go to next/previous shield/weapon and buy...adds the item and takes away that much gold....like that....when you press ESC it will exit......is that possible?


The code you showed me MIGHT work...i'll have to try it out later
Well, the code itself won't work directly - it's pseudocode, which isn't real code (just set up like it). The general setup is there though, where it branches and such.

But if you want left/right buttons displayed on-screen, you can just add another static picture with << and >> arrows on it. Heck, you can even the ESC to quit, ENTER to buy commands on there as well. Basically, dress it up however you want - the real issue is the picture that changes, which should be controlled with a variable that gets +1 or -1 to it, depending on the direction chosen.

And I just got up at 3:00 PM here. I should really get to bed eariler..
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 
 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 04:28 AM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.