|
Post by lukebord1 on Jan 21, 2015 20:16:58 GMT
Hi enthusiasts! I've a FIRE issue:
it's easy to write a "single shot" routine, by playing with variables. But...
is there a way to get a kind of "keypress/keyup" listener, in order to avoid an annoying continuous shooting while holding the fire key?
|
|
|
Post by lukebord1 on Jan 21, 2015 21:33:26 GMT
Thanks to a great BiNMaN suggestion, here's the solution combined with my code:
IF KEY 4 // shoot IF PARAMA = 0 // avoid continuous shooting while key holding IF G = 4 // single shoot condition (0-3 gives bullet's direction) LET PARAMA = 1 LET G = IMAGE // used for bullet's direction SPAWN 5 10 // bullet sprite ENDIF ENDIF ELSE LET PARAMA = 0 ENDIF
|
|