I realized that I misunderstood you the last time too
But here's what you wanted, the demo making of your question's answer.
Note 1: Making a variable is done by clicking the variables button in the script editor, then clicking add. There specify name, and type, addictionally wether all actors can use the variable, or only the actor you're working with at the moment.
Note 2: I've changed the way of moving the character, compared to the demos, to make this work. Instead x = x + 5; (or x+=5; ) , to xvelocity = 5; There's another way of doing it, which I only just thought of now, which includes enabling/disabling actions. But this I believe will be better for you, so you get to know some more coding, which will be required if you continue to the more advanced levels...
- ctrldemo.zip
- The demo. Study! :)
- (43.28 KiB) Downloaded 165 times
Note 3: I made 2 extra variables. 1 to make sure the ctrl only takes effect when colliding, 2 so that ctrl actually can stop the actor even if constntly pushing the arrow keys...
Study & enjoy! Hope you understand!
If you ave any questions, or anything you want to do differently, and/or want to know about the second way of doing it, just say so!