View previous topic :: View next topic |
Author |
Message |
Robot Skeleton King

Joined: 20 Oct 2008 Posts: 72
|
Posted: Mon Oct 20, 2008 2:31 pm Post subject: Is it possible to display an item count always? |
|
|
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 |
|
 |
Uncommon His legend will never die

Joined: 10 Mar 2003 Posts: 2503
|
Posted: Mon Oct 20, 2008 3:00 pm Post subject: |
|
|
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 |
|
 |
TwinHamster ♫ Furious souls, burn eternally! ♫

Joined: 07 Mar 2004 Posts: 1352
|
Posted: Mon Oct 20, 2008 3:06 pm Post subject: |
|
|
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 |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Mon Oct 20, 2008 3:24 pm Post subject: |
|
|
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 |
|
 |
Robot Skeleton King

Joined: 20 Oct 2008 Posts: 72
|
Posted: Mon Oct 20, 2008 3:39 pm Post subject: |
|
|
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 |
|
 |
|