Game
My own farm business






2 years ago

Movin' the player with GML Visual (DnD)

Moviendo al jugador con GML Visual (DnD)

Article/Artículo:


Using the key down means you keep the button pressed, it's not like the key pressed you can press and release it, so as long as the key is pressed, the sprite changes to the walking animation and the movement in the selected direction advances.

Vertical + is down, - is up.

Horizontal + is right, - is left.

---

Usando el key down significa que mantienes el botón apretado, no es como el key pressed que puedes pulsarla y soltarla, así que mientras esté pulsada la tecla, el sprite cambia a la animación de andar y el movimiento dirección seleccionada avanza.

Vertical + es abajo, - es arriba.

Horizontal + es derecha, - es izquierda.

---

Releasing the key should stop the movement and return to being still.

Using the key released you create a condition for it, you set the speed to 0 and so the movement stops, changing the sprite you can use one with the 4 directions with the fps at 0.

---

Al soltar la tecla debe cesar el movimiento y volver a estar quieto.

Usando el key released creas una condición para ello, pones al set speed 0 y así cesa el movimiento, cambiando el sprite puedes usar uno con las 4 direcciones con los fps a 0.

---

Finally, something interesting, using the set instance variable with depth selected, you add the -bbox_bottom, which means that depth makes the character above or below another object depending on whether it collides with its box.

It should also be on the objects where you want it to do the effect.

---

Por último, algo interesante, usando el set instance variable con el depth seleccionado, añades el -bbox_bottom, que significa que el depth (profundidad) hace que el personaje esté por encima o debajo de otro objeto según si colisiona con su caja.

También debe estar en los objetos donde quieres que haga el efecto.



5 comments

Loading...

Next up

He estado mejorando mi sistema de diálogos de game maker, de paso practiqué el estilo de dibujo de HB.

happy halloween! Fizz is doing cosplay of Reala from Nights into dreams XD

NPCs moviéndose en la dirección que toca, haciendo pausas. NPCs moving in the right direction, doing some pauses.

🥳 The Highrise Game Jam is Underway! 🥳

Watch the video for tips on getting started building your first world in Highrise Studio. (Creating and submitting within Highrise Studio Hub is the only way to enter the jam!)

Learn more: https://gamejolt.com/c/gamedev/highrisejam

The minimap working El minimapa funcionando

🥳The Highrise Game Jam has begun! 🥳

The Highrise Game Jam is where creators come together to craft immersive 3D worlds using Highrise Studio! There are cash prizes! 💸💸💸

Learn the deets here: https://gamejolt.com/c/gamedev/highrisejam

VN for the jam ready in english and spanish. VN para el jam lista en inglés y español.

📢The Highrise Game Jam is Starting Soon! 📢

We're gonna kick it off early to give you more time to make your game! Submit a game before the deadline to enter to win CASH MONIES!

Learn when it starts and all the other deets: https://gamejolt.com/c/gamedev/highrisejam

Just a short alternative ending for unhappy campers I did for practice the style of HB