Announcement: Be excellent to each other.


Caravel Forum : DROD RPG Boards : RPG Architecture : Accessory Help Needed!
New Topic New Poll Post Reply
Poster Message
Jeff_Ray...
Level: Smitemaster
Avatar
Rank Points: 962
Registered: 05-16-2005
IP: Logged
icon Accessory Help Needed! (0)  
Right now, I'm building a small RPG puzzle hold similar to Paycheck and Cerulean Room. However, I made a new tool, but it doesn't want to respond!
Here's the Code:
Click here to view the secret text

How do I make it work?
Thanks in advance,
~Jeff_Ray...

____________________________
I make Let's Plays too!
Click here to find out my LPs' progress, and find out what I plan to tackle next!

Currently playing:
Click here to view the secret text


My Holds:
-Completed:
Click here to view the secret text

-Work in Progress:
Click here to view the secret text


[Last edited by Jeff_Ray... at 03-15-2009 09:44 PM]
03-15-2009 at 12:22 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Nuntar
Level: Smitemaster
Avatar
Rank Points: 4590
Registered: 02-20-2007
IP: Logged
icon Re: Accessory Help Needed! (+2)  
Remove "Go to 2" and "Label 2", and while you're at it you may as well remove "Label 4", since without a "Go to 4" anywhere in the script that line is not doing anything.

Look at what's happening: when you use the accessory at (10,8) or (10,9) the first "If" evaluates as true, so the three inner lines are activated, including "Go to 2". This jumps to "Label 2". The next command is an "If": is the player at (2,11) to (4,11)? No, of course not, we just said he's at (10,8) or (10,9). So this evaluates as false and the "Else" part is activated, making the player say "Can't use it here."

I think what you were trying to achieve with "Go to 2" was making the script jump over the first "If" so that it couldn't be used to remove an item from (9,8) twice? Learn that "If" isn't "Wait". Once the script reaches the second "If", it will check once whether the condition is true, see that it isn't, do the "Else" bit and then do whatever comes after the "If", which here makes it jump right back to Label 1 again.

If you remove "Go to 2" and "Label 2", the script will work, but it will be possible to remove an item from (9,8) twice. That's only important if some other script can put an item back on that square after this script has removed one, though. If that is the case and it's important to you to prevent the item removal happening twice, put an "If... Wait until var "ShovelFill = 0" " inside that first "If". (Custom variables whose values have not yet been set evaluate to 0.)

Let me know if there's anything you need me to go over again.

____________________________
50th Skywatcher
03-15-2009 at 01:57 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD RPG Boards : RPG Architecture : Accessory Help Needed!
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.