hello
is it posible to get an event when a keyboard key is released
ty.
event on key release
event on key release
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
I recommend reading the tutorials
http://irrlicht.sourceforge.net/tutorials.html
especially this one:
http://irrlicht.sourceforge.net/tut004.html
There key-up events are processed.
http://irrlicht.sourceforge.net/tutorials.html
especially this one:
http://irrlicht.sourceforge.net/tut004.html
There key-up events are processed.
It is like it is. And because it is like it is, things are like they are.
ty but that wont do
i use
to be able to use a more generalized reciver -simply put i do not want any action in the reciever code -it ought to be an external class with total transparency regarding the action in the main part
putting motion etc in the reciver is not a good thing (OOP wise)
i simply want a boolean state change when the keys in the key-array is inactive -eg 'up'
i use
Code: Select all
if(event.EventType == irr::EET_KEY_INPUT_EVENT)
{
keys[event.KeyInput.Key] = event.KeyInput.PressedDown;
}
putting motion etc in the reciver is not a good thing (OOP wise)
i simply want a boolean state change when the keys in the key-array is inactive -eg 'up'
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
then you're also also going to have to keep a bool key_changed[] array and set it to true for a key that just changed. You'll have to make sure your update function sets all the flags to false at the end of an update.
Personally, I dont like this idea- instead I use the EventReciever class to pipe events into my current game state object, so an event can be handled when its generated. see ICE 3.0 for more details
Personally, I dont like this idea- instead I use the EventReciever class to pipe events into my current game state object, so an event can be handled when its generated. see ICE 3.0 for more details
a screen cap is worth 0x100000 DWORDS
ty. both -as for now i use a 'compromize' sort of..
in the reciver (std irr) i only make a state change -then i let the behaviour depend on the state- with this i can still have the event implemented outside the reciever
-not 'good' but reasonably functionallity ;(
-Next step: use a timer as udater for the behaviour
endresult : semiautomatic shooting
in the reciver (std irr) i only make a state change -then i let the behaviour depend on the state- with this i can still have the event implemented outside the reciever
-not 'good' but reasonably functionallity ;(
-Next step: use a timer as udater for the behaviour
endresult : semiautomatic shooting
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |