a new cmd
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
I don't get the sense of this, because it's already possible with scripts.
This:
is the same as this:
The key state will stay 'released' until it is pressed again, but that doesn't affect your script code, it is only executed once. If you wanted, you could make it even more detailed with states like "pressed", "just released", "released", "just pressed"...
This:
Code: Select all
if(self.key_released)
{
(Code goes here)
}
Code: Select all
KEY_RELEASED_XX [false]
if(self.key_pressed=XX)
{
KEY_RELEASED_XX=false;
}
else
{
if(KEY_RELEASED_XX=false)
{
(Code goes here)
KEY_RELEASED_XX=true;
}
}
Everyone can see the difficult, but only the wise can see the simple.
-----
-----