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

Is it possible to display an item count always?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade
View previous topic :: View next topic  
Author Message
Robot
Skeleton King




Joined: 20 Oct 2008
Posts: 72

PostPosted: Mon Oct 20, 2008 2:31 pm    Post subject: Is it possible to display an item count always? Reply with quote

I was wondering if it would be possible to always display the number of a single item that the player has, and have this update in real-time whenever your item count changes.

Thanks!
_________________
---
8bitcity.blogspot.com
Back to top
View user's profile Send private message Visit poster's website
Uncommon
His legend will never die




Joined: 10 Mar 2003
Posts: 2503

PostPosted: Mon Oct 20, 2008 3:00 pm    Post subject: Reply with quote

You could use "show value (inventory (item))" if it's only one you need.
If it's related to your Hearts script, you could put that same line in the script that causes the damage to make it update.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
TwinHamster
♫ Furious souls, burn eternally! ♫




Joined: 07 Mar 2004
Posts: 1352

PostPosted: Mon Oct 20, 2008 3:06 pm    Post subject: Reply with quote

I would highly recommend you take a look at strings for this.

I'm pretty sure that 'show string at (ID, x, y)' and 'center string at (ID, x, y)' are the only functions that show Strings in real-time.
Back to top
View user's profile Send private message Send e-mail AIM Address
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Mon Oct 20, 2008 3:24 pm    Post subject: Reply with quote

In the OHR font, character 133 is a heart, so I would do something like this:

Code:

plotscript, update heart display, begin
  $0="Hearts:"
  variable(i)
  for(i, 1, inventory(item:hearts)) do, begin
    append ascii(0, 133)
  end
  show string at(0, 0, 190)
end


That should give you a life meter that shows one little heart symbol for each life you have. Call this script from inside your damage script.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Robot
Skeleton King




Joined: 20 Oct 2008
Posts: 72

PostPosted: Mon Oct 20, 2008 3:39 pm    Post subject: Reply with quote

And, again, you guys are insanely helpful.

Thanks!

And yes, it is related to my heart script, I figure that the player would most likely want their life displayed at all times.
_________________
---
8bitcity.blogspot.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Arcade All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot 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