Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Stop Player Movement HELP!

Alright im using RPG Maker VX and I havent used it in  a long long time...( so im a newb again  :pissed: )

I'm in the process of making this cutscene before I release the beta to my friend but theres one problem... My player can move around during the cutscene...this really messes up the cutscene...so I was wondering if there was a way to make a character unable to move during a cutscene...
 
Please make sure you are posting in the correct subforum before you make a topic.

Insert this below the Materials section:
Code:
class Game_Player
  attr_accessor :disable_movement
  alias_method :seph_disablemovement_gmplyr_mv?, :movable?
  def movable?
    return false if @disable_movement != nil && disable_movement
    return seph_disablemovement_gmplyr_mv?
  end
end

Now, to disable/enable player movement
Code:
$game_player.disable_movement = true or false
 
Well, Seph got in before me, but I still thought this might be useful, epecially to those who are just too afraid to use a script.

Well, all you have to do is set the player movement to "Move Toward Player" on repeat. Then, when the cut scene is over, you set the player's movement to "Move Away from Player". So the event could look something like this:

@>Set Move Route: Player (Repeat)
:                       : $>Move toward Player
: Your cut scene stuff...
@>Set Move Route: Player
:                       : $>Move away from Player

Also, if you move the player during the cut scene, make sure you add the first command after that movement, or they will be able to move again.
 
to those who are just too afraid to use a script.

Is 8 lines of code scary? I mean, yeah, I could hide code in my scripts that reads your entire hard drives and sends the file details back to me in email, but... I would hate to see all the pron on some of these kids computers...
 
SephirothSpawn":26baeqpm said:
Please make sure you are posting in the correct subforum before you make a topic.

Insert this below the Materials section:
Code:
class Game_Player
  attr_accessor :disable_movement
  alias_method :seph_disablemovement_gmplyr_mv?, :movable?
  def movable?
    return false if @disable_movement != nil && disable_movement
    return seph_disablemovement_gmplyr_mv?
  end
end

Now, to disable/enable player movement
Code:
$game_player.disable_movement = true or false

So in my events I just make the envent say "Run Script..." and then paste that script into whatever pops up
 
SephirothSpawn":2nw283vc said:
to those who are just too afraid to use a script.

Is 8 lines of code scary? I mean, yeah, I could hide code in my scripts that reads your entire hard drives and sends the file details back to me in email, but... I would hate to see all the pron on some of these kids computers...

That's not what I'm saying. Just like some people are so afraid of spiders that they call a friend over to kill one, some people just have an irrational fear of scripts of any kind. I just wanted to provide an alternative. Also, good luck with the cut scene, Naughty3chia.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top