Hi, I'm cleaning my code a bit and I'm wondering if I can use the component KeyPress directly in a ZExpression with @KeyPress.
If yes, how do I handle the OnPressed state?
Thanks
How to use @KeyPress directly in a ZExpression?
Moderator: Moderators
Re: How to use @KeyPress directly in a ZExpression?
Hi Ats,
I'd be more than happy to provide a example, but i'm not exactly sure what your particular requirements are.
K
That's not possible no. However, even if it were possible i'd instead recommend handling all your inputs ( keyboard / mouse / joystick / touch ) at the start of each frame and storing the results in one or more arrays. Then you can use those arrays from anywhere in your code .. or if you prefer you could wrap access to them in a number of descriptive functions.
I'd be more than happy to provide a example, but i'm not exactly sure what your particular requirements are.
K
Re: How to use @KeyPress directly in a ZExpression?
Oh, all right.
Thanks for the tips. This is more or less what I already do, but I was planing on cleaning all those Condition and KeyPress components, but if it isn't possible, I won't touch it, it's working
Thanks for the tips. This is more or less what I already do, but I was planing on cleaning all those Condition and KeyPress components, but if it isn't possible, I won't touch it, it's working
