Home
Help
Search
Calendar
Login
Register
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Click here to join us on IRC (#charas on irc.freenode.net)!
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Ghost in the Machine.
« previous
next »
Print
Pages: [
1
]
Author
Topic: Ghost in the Machine. (Read 1474 times)
tekmansam
Associate
Posts: 116
Ghost in the Machine.
«
on:
August 02, 2009, 12:10:47 AM »
Here is my finished code for my custom shop. It all works but there is a ghost in the machine. I have a little bug I can't seem to shake. If anyone has the time to look over this code heres the problem I'm having. The code sets up a[spoiler="custom shop"]
[/spoiler] with a backdrop, menu box, cursor, and 4 menu items. All works well but the cursor starts in position one on "long sword" as it should but the cursor does not appear until key input is pressed once. That's no big deal but if you go to "sell" then come back and go to buy the cursor does not appear until it cycles through all the menu items once.
[spoiler="Custom Shop Event"]
<>Show Picture; 1, testpic-0002, (160,120)
<>Branch if Switch [0002:message] is OFF
<>Message: Welcome to Up in Arms. Finest
: blades south of Dorter.
<>Label: 2
<>Show Choices: Buy/Sell/Leave
:[Buy] Handler
<>Switch Operation: [0002:message] ON
<>Jump to Label: 1
<>
:[Sell] Handler
<>Open Shop: Sell Only
<>Jump to Label: 2
<>
:[Leave] Handler
<>Message: Happy hunting.
<>Teleport: 0003:Corneria (015,026), Down
<>Erase Picture: 2
<>Erase Picture: 3
<>Erase Picture: 4
<>Erase Picture: 5
<>Erase Picture: 6
<>Erase Picture: 7
<>Sprite Transparency: Opaque
<>Main Menu Access: Allow
<>Switch Operation: [0002:message] OFF
<>End Event Processing
<>
: End
<>
: Else Handler
<>
: End
<>Label: 1
<>Show Picture: 2, testmenu-0001, (65, 100)
<>Show Picture: 4, menuitem-longsword, (65, 28)
<>Show Picture: 5, menuitem-rapier, (65, 47)
<>Show Picture: 6, menuitem-scimitar, (65, 67)
<>Show Picture: 7, menuitem-dagger, (65, 87)
<>Variable Oper: [0003:key input menu] Set, 1
<>Key Input Proc: [0003:key input menu]
<>Branch if Var [0003:key input menu] is 1
<>Branch if Var [0004:cursor position]is 4
<>Variable Oper: [0004:cursor position] Set, 1
<>
: Else Handler
<>Variable Oper: [0004:cursor position] +, 1
<>
: End
<>Wait: 0.1 Sec
<>Play Sound: cursor1
<>
: Else Handler
<>
: End
<>Branch if Var [0003:key input menu]is 4
<>Branch if Var [0004:cursor position]is 1
<>Variable Oper: [0004:cursor position] Set, 4
<>
: Else Handler
<>Variable Oper: [0004:cursor position] - , 1
<>
: End
<>Wait: 0.1 Sec
<>Play Sound: cursor1
<>
: Else Handler
<>
: End
<>Branch if Var [0003:key input menu] is 6
<>Play Sound: cancel1
<>Erase Picture: 2
<>Erase Picture: 3
<>Erase Picture: 4
<>Erase Picture: 5
<>Erase Picture: 6
<>Erase Picture: 7
<>Jump to Label: 2
<>
: Else Handler
<>
: End
<>Branch if Var [0004:cursor position]is 1
<>Show Picture: 3, cursor, (140, 137)
<>
: Else Handler
<>
: End
<>Branch if Var [0004:cursor position] is 2
<>Move Picture: 3, (140, 157), 0.0 Sec (Wait)
<>
: Else Handler
<>
: End
<>Branch if Var [0004:cursor position] is 3
<>Move Picture: 3, (140, 177), 0.0 Sec (Wait)
<>
: Else
<>
: End
<>
<>Branch if Var [0004:cursor position] is 4
<>Move Picture: 3, (140, 197), 0.0 Sec (Wait)
<>
: Else Handler
<>
: End
<>Branch if Var [0004:cursor position] is 1
<>Branch if Var [0003:key input menu]is 5
<>Message: Buy Long Sword for 15 Gold?
<>Show Choices: Yes/No
:[Yes] Handler
<>Branch if Money is 15 or more
<>Change Items: Long Sword 1 Add
<>Change Money: 16 Remove
<>Play Sound: item1
<>Message: what else?
<>
:Else Handler
<>Message: Seems you're a little short.
<>Play Sound: cancel1
<>
:End
<>
:[No] Handler
<>
:End
<>
:Else Handler
<>
:End
<>
:Else Handler
<>
:End
<>Branch if Var [0004:cursor position] is 2
<>Branch if Var [0003:key input menu]is 5
<>Message: Buy Rapier for 20 Gold?
<>Show Choices: Yes/No
:[Yes] Handler
<>Branch if Money is 20 or more
<>Change Items: Rapier 1 Add
<>Change Money: 20 Remove
<>Play Sound: item1
<>Message: what else?
<>
:Else Handler
<>Message: Seems you're a little short.
<>Play Sound: cancel1
<>
:End
<>
:[No] Handler
<>
:End
<>
:Else Handler
<>
:End
<>
:Else Handler
<>
:End
<>Branch if Var [0004:cursor position] is 3
<>Branch if Var [0003:key input menu]is 5
<>Message: Buy Scimitar for 20 Gold?
<>Show Choices: Yes/No
:[Yes] Handler
<>Branch if Money is 20 or more
<>Change Items: Scimitar 1 Add
<>Change Money: 20 Remove
<>Play Sound: item1
<>Message: what else?
<>
:Else Handler
<>Message: Seems you're a little short.
<>Play Sound: cancel1
<>
:End
<>
:[No] Handler
<>
:End
<>
:Else Handler
<>
:End
<>
:Else Handler
<>
:End
<>Branch if Var [0004:cursor position] is 4
<>Branch if Var [0003:key input menu]is 5
<>Message: Buy Dagger for 5 Gold?
<>Show Choices: Yes/No
:[Yes] Handler
<>Branch if Money is 5 or more
<>Change Items: Dagger 1 Add
<>Change Money: 5 Remove
<>Play Sound: item1
<>Message: what else?
<>
:Else Handler
<>Message: Seems you're a little short.
<>Play Sound: cancel1
<>
:End
<>
:[No] Handler
<>
:End
<>
:Else Handler
<>
:End
<>
:Else Handler
<>
:End[/spoiler]
«
Last Edit: August 02, 2009, 12:12:27 AM by tekmansam
»
Logged
Cookies on dowels HAHA!
Print
Pages: [
1
]
« previous
next »
Charas-Project
»
Game Creation
»
Requests
»
RPG Maker Programming
»
Ghost in the Machine.