RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
8 directions movement

0 Members and 1 Guest are viewing this topic.

***
3==D This is my bellend.
Rep:
Level 83
go into game_player and find this line

Code: [Select]
def update
it is around line #204

you should see this code below that line.

Code: [Select]
case Input.dir4
                 when 2
                    move_down
                 when 4
                     move_left
                 when 6
                    move_right
                 when 8
                     move_up
  end

replace that block with the following

Code: [Select]
case Input.dir4
                 when 2
                    move_down
                 when 4
                     move_left
                 when 6
                    move_right
                 when 8
                     move_up
                 when 7
                     move_upper_left
                 when 9
                     move_upper_right
                 when 3
                     move_lower_right
                 when 1
                     move_lower_left
                 end

and finally,you have 8 direction movement
no

By Kraft

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
move_upper_left does work and such, but the script itself does not.

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Well, it would work if Input.dir4 was replaced with Input.dir8


8D movement is very simple (other scripts are long because they try to allow for 8D sprites and they also put in pixel movement so that the time taken to move upper right is longer than to move up or right, because otherwise it doesn't make sense); I doubt he'd have to copy it from a script to get that, and even if he had it wouldn't matter because it's too minor and it wouldn't make any sense to do it any other way.

You people are such negative nancies :P

****
kikiki
Rep:
Level 84
Hi
Yeah, if it says that there is only 4 directions, but you input 8, you will get an error.
Hi

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
yep, that fixes it up, MA.

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon