Game Development Reference
In-Depth Information
Making the sprite move constantly
Right now, the sprite just moves one pixel in each direction. If you hold any of the WASD
keys down, the sprite still moves only one pixel. Let's change the appropriate line of code
so that when we hold the key down, the sprite will constantly move. The steps are as fol-
lows:
1. Right-click on the Keyboard event and select Replace condition , as shown in the
following screenshot:
2. You should then get the Replace condition window shown in the following
screenshot:
Search WWH ::




Custom Search