On any key released[unresolved]

New releases and general discussions.

Post » Wed Jul 15, 2009 8:16 am

Possible or not? I want to call a function anytime a key is pressed or released. I would be able to do that with 2 events. I figure it more not be possible or hard for some reason if it's not already there?
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Wed Jul 15, 2009 8:38 am

add event: system: For loop
from 0 - 100
subevent Mouse Keyboard: On Key Released,
instead of choosing a key, right click just above where you would choose a key
and click use expression
for the expression type in "loopindex"

and there's already an "on any key pressed" one
but I think that's what you meant
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Jul 15, 2009 10:38 am

where is the Any key?
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Wed Jul 15, 2009 10:49 am

Thanks for showing how to tool around with key loopindex. Unfortunately, this doesn't work 100% properly. (Using "on key press" as example) you see - when you pressed two different keys it will loop indefinately like it was "key is down" event. The native trigger "on any key pressed" however works no matter how or how many you press or are already down. (EDIT: depending on your keyboard I should say, some limit number of keys at same time)



Last event works right. Other two are not quite there yet. As you can tell trying "On Release" produces the same effect.
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Wed Jul 15, 2009 7:33 pm

anyway.... heres a video showing whats up.
http://www.mediafire.com/?sharekey=da7a ... f6e8ebb871
Alt Link (this link my not work)

when the pink one doesnt move im holding j and pressing k or vice versa. when i hold h and press j it spins indefinitely. seems pretty random. the other one just moves on any press like its supposed to. now a on key release equivalent condition would be nice. i ll post a feature request in tracker sometime in the future. have fun with yourselves guys.

for future users if this is not added

go into google and search 1 to 89 copy and paste into notepad highlight a blank space and replace blank space with word or or | to take up less space put that in for your key instead of loopindex bye
B
2
S
2
G
4
Posts: 259
Reputation: 1,968


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests