Key press: "when up is down" is not working...
Hi everyone... I hope this is something I'm doing wrong and not a bug (since getting a bug fix will take much longer...):
I was trying to change an attribute when the up, down, left or right keys were pressed but it wasn't working. I ended up constraining the attribute to a game attribute and then displaying that on a test actor just to see what was going on. I found that the arrow keys were not changing the attribute at all. To test a little further I went in to my test actor and gave it a simple, "when up is down destroy this actor" command, but still, nothing. I tried change it to "when down is down destroy this actor," but still, nothing. Then I tried using "j" (just a random letter key), but it still wouldn't work. Finally, I tried changing it to "when mouse button is down, destroy this actor." That worked.
Am I using the key press wrong here, or is there some kind of bug? I'm using the Window version if that makes a difference.
Comments
I use the arrow keys all the time with rules like that and it works just fine. I'm thinking you have the rules set up wrong or something else is conflicting with it to stop them from working. Are you sure your actor that you expect to be destroyed is linked to the prototype and has not been turned into an instance?
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
GameSalad was suffering some kind of glitch. I closed and reopened it and it started working without changing any rules.
Thanks, though, Jamie
Thats not too uncommon, glad it's working now.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page