I know it can already be faked, but ZScript needs "Press(Input*)" And "Release(Input*)"
Pretty much they're just functions that return a bool when the input is true then not true and vice-versa.
You would need this if you wanted to make a playable ocarina, or even most custom items.
I'm not sure I see how this would be different from what we already have. Do you mean to write event-driven scripts?
By the way, use [font="Courier New"][/color][/font] instead of [font="Courier New"][color=Black][/font]. It's white for some of us, remember.
Saffith wrote:By the way, use [FONT=Courier New][/color][/FONT] instead of [FONT=Courier New][color=Black][/FONT]. It's white for some of us, remember.
Sorry, I use the WYSIWYG text editor.
Well, normally, the keypress events return true every frame, this way, they only return true once. (when the button just gets pushed or released)
While Press* and Release* would indeed be helpful, it can be somewhat faked right now. Take a look at this part of my Fixed Direction script:
http://www.armageddongames.net//thread/94457/
if (!Link->InputL && !Link->InputR) {
turned = false;
}
if (Link->InputL) {
Link->InputL = false;
if (!turned) turn(false);
}
if (Link->InputR) {
Link->InputR = false;
if (!turned) turn(true);
}
In case it isn't obvious from the snippet, that turn() function is setting turned to true. See how I just prevented the code from firing again as long as the button is still held down? You could hook a function to either side of the logic to emulate the two functions. Of course, you'd need a separate loop and boolean for each key/combination you want to check for...