PDA

View Full Version : Interjection! For item usage.



ShadowTiger
06-17-2007, 10:13 AM
I spent most of last night dreaming about ZScript and mouthwash for gargoyles. Between ad campaigns practiced high atop my flying mounts well above an otherwise dreary city, I was planning for a script I'd eventually like to make.

This script will check to see if you are using a Medicine item, and then if you are at Maximum health, or, possibly even, a little less than maximum health, since it's virtually improbable that they'll be using it at anything above 75% health. :odd: If you are indeed above such a level of health, the script will DENY you use of the potion, not using the potion at all, and will play one of those Error (http://noproblo.dayjo.org/ZeldaSounds/LTTP/LTTP_Error.wav) Sounds (http://noproblo.dayjo.org/ZeldaSounds/OOT_New/OOT_Error.wav).


However, if you use the potion in the first place, well, you'll have used the potion, and would have to be given another one. This means that if your health is anything less than 100%, you'll essentially be given free health for using this potion and then receiving another one, since that's the route I'd have to take to compensate for this removal of a potion.

Thus, if we could have some sort of internal spacer with which to run this script before the item is used, we could just deny the use of the potion without having to use it to realize it was used.

Now to actually read the ZScript Docs again to see what sort of commands there would be to initiate this.



Just a few scribblies of my own:

//Medicine Police Script: Prevents you from misusing your medicine.
//If you are at maximum health, you will be unable to use the potion,
//and will be slapped on the wrist with a beep at your obnoxious efforts.

import "std.zh"
item script Medicinepolice

if (Link->HP == Link->MaxHP)
{
void PlaySound(YOUR##HERE-i.e.-60-is-the-first-free-one);
}

.. Yep, that's all I have so far. Sad.

_L_
06-17-2007, 10:36 AM
mouthwash for gargoyles.
Genius!

*ignores rest of post*

ShadowTiger
06-17-2007, 10:58 AM
... ... Crap!

If you need me, I'll be in the patent office. ... Geez, BBL.