Announcement: Be excellent to each other.


Caravel Forum : DROD RPG Boards : RPG Bugs : Each Use Problem
New Topic New Poll Post Reply
Poster Message
12th Archivist
Level: Smitemaster
Avatar
Rank Points: 789
Registered: 12-07-2008
IP: Logged
icon Each Use Problem (0)  
Right now, I'm working on a script that whenever you "activate" the item, the script checks to see if you have any ammo left. If you don't, the player says, "I don't have enough ammo!".

The problem here is the player says he doesn't have enough ammo every turn (turn, not click). I believe this is because the "Each Use (goto)" is buggy.

It's buggy because I believe the Each Use checks to see, not if you're using the object, but rather if you have the object equipped, before it goes on its script.

Is this a bug? If not, is there some way of making this problem go away, or should I just put in "Wait 0 turns" 21754931 times to prevent the guy from saying it in the open?

____________________________
It was going well until it exploded.
~Scott Manley

Check out the DROD Wikia project here!
01-11-2009 at 11:28 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Kwakstur
Level: Smiter
Avatar
Rank Points: 385
Registered: 05-05-2006
IP: Logged
icon Re: Each Use Problem (+2)  
Did you remember to tell the script to skip over the usage label? You should tell it to go to a label at the end of the code where nothing happens. i.e.
  Each use Fire
  Go to Await use
Label Fire
  ...
  [firing code]
  ...
Label Await use
You should also make sure all pathways through the Each use code lead back to Await use at the end of the turn it is used. If your Use code must take more than 1 turn, watch out for possible bugs from the player using it a second time while the code is still running.

____________________________
Also known as ExpHP everywhere else.

[Last edited by Kwakstur at 01-12-2009 12:08 AM]
01-11-2009 at 11:47 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
12th Archivist
Level: Smitemaster
Avatar
Rank Points: 789
Registered: 12-07-2008
IP: Logged
icon Re: Each Use Problem (0)  
You are awesome, man! You are AWESOME! That totally fixes it! Thanks! :D :D :D

I have another problem regarding scripting, but it should go in the RPG Architecture Board.

____________________________
It was going well until it exploded.
~Scott Manley

Check out the DROD Wikia project here!
01-12-2009 at 12:03 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD RPG Boards : RPG Bugs : Each Use Problem
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.