Jump to content

- - - - -

Hotline Miami Movement

  • Please log in to reply
1 reply to this topic

#1 shayanfaysal


    GMC Member

  • New Member
  • 2 posts
  • Version:GM8.1

Posted 04 January 2016 - 04:20 PM

  • Title:  Hotline Miami Movement
  • Description:  Hotline Miami movement using different sprites for the body and the feet/legs
  • GM Version: GM8.1
  • Registered: Yes
  • File Type: .gm81
  • File Size:  25.5 kb
  • File Link:  http://host-a.net/u/...tlinemiami.gm81
  • Required Extension: none
  • Required DLL: none
  • Tags: topdown, hotline miami, movement, wrong number


This example shows how player movement like in Hotline Miami can be achieved using different sprites for the body and feet/legs. The player's body turns towards the mouse whereas his feet/legs move around without changing direction. Knife attack and Hotline Miami cursor included.

Edited by shayanfaysal, 05 January 2016 - 01:27 PM.

  • 0

#2 chance


    GMC Member

  • Global Moderators
  • 8762 posts
  • Version:GM:Studio

Posted 05 January 2016 - 12:34 PM

Hotline Miami movement using different sprites for the body and the feet/legs

The feet and leg sprites are underneath the sprite for the body.  So you can't see them unless you set the player object invisible.  Or give the feet a depth value that's smaller than the obj_player object.   Otherwise, what's the point of having them? 
The other problem is that none of the GML code is properly terminated with semicolons.   And very little indenting is used.  Indenting is especially useful when you have nested IF statements, for example.  So those two things should really be fixed before we move this back to the Tutorials Forum.
Other than that, the example runs fine.  So it could be a useful example for beginners.


EDIT:  I just reviewed your latest version, and it's much better.   You've added proper indenting to your nested IF statements.  And you've made an effort to terminate statements.   A few multiple statements within IF brackets still need fixing.  But it's OK for now.   If you're confused about how this should be done in GML, have a look at the examples in the manual.  Or look at some other examples in the Tutorials forum.
The change to the walking animation is better too.  You can now see the feet an the player moves.
So I'll move this back to Tutorials.

Edited by chance, 05 January 2016 - 12:34 PM.

  • 0