PASSABILITY AND DASHING

Posts

Pages: 1
Let's say that I want to change the run button to the fly button and make it so that you can fly over SOME but NOT ALL terrain that would normally be impassable so long as you are flying (dashing).

How hard would something like that be to script? I imagine you'd want to link it to the 63 Regions that Ace has. 63 is a really specific number.

(Yes, I'm pretty sure there's theoretically a way to accomplish this through eventing, but it wouldn't come out as pretty.)

Edit: I forgot to put VX Ace in the title, and now it won't let me/I don't know how. Sorry. VX Ace.
There are scripts that can use regions to block movement:
https://yanflychannel.wordpress.com/rmvxa/field-scripts/move-restrict-region/

Checking if the player is dashing or not is easy, there's a function in Game_Player for it.

Then to make things nice, you'll want to change the character sprite while dashing to show a flying animation.

So should be doable, maybe as simple as hacking yanfly's script to skip the region check while dashing. But, you might need to make the water tiles passable in the tileset and rely on the region to block them.

The MV version of the same script has a setting to make a particular region always passable.
Cool, thanks coelocanth (again!! I'm still teh swoons for Phantom Queen). I'll check out that script, sounds like it should work.

I've got a flying as well as a walking animation for my owl (yay!) and am using a Victor Engine script that lets you use a different sprite for when you're dashing by putting a suffix on the end of the filename (I wouldn't know about it if not for Chapelwaite and working with those awesome and/or awful--I have trouble deciding which--PVG graphics.)

I am really trying to actually learn some of the basics of scripting but my brain is very well optimized for scripting in the sense of plays or movies and extremely dumb at scripting in the sense of code.

I'm trying to figure out how to get this snippet from Game_Player to simply check if the player is dashing so I can port that over to YF's script...I am SURE this is ridiculously basic and simple but gah...my brain hurts. I wish I wasn't so bad at learning scripting...or that I didn't love making video games. It's kind of a bad combination but thank God for RPG Maker.

From Game_Player line 137 just like coelocanth said.

  def dash?
return false if @move_route_forcing
return false if $game_map.disable_dash?
return false if vehicle
return Input.press?(:A)
end

I feel like I can grok the if, elsif, and unless control structures (um, I think that's what they're called?) but the 'return' control structure (which again believe me, I know is SUPER BASIC AND FUNDAMENTAL) somehow confuses me.
The simple answer is to use:

if $gamePlayer.dash?


Because you just want to call that existing function to find out if the player is dashing or not.

The 'return' means "ignore the rest of the function, I have the answer"
And
return false if @move_route_forcing
is just a shorthand way of writing
if @move_route_forcing
  return false
I think I understand. Working on so many aspects of this project at once not sure when I'll get to actually try this out. Thanks again, dude.
Pages: 1