Jump to content
Xzeph

Pokemon Like Movement

Recommended Posts

So I was having this little problem, I have to go the opposite direction and back just to face a certain direction. It's kinda okay for me at first but then....

So I think it's time for a change, can someone kindly make a script that mimics the movement of Pokemon series? Like you don't need to move from one tile to another just to face a certain direction.

I would be eternally grateful if someone could solve this "little problem" of mine.

 

 

 

 

--- Sorry for my bad English. (n_n")

Share this post


Link to post
Share on other sites
class Game_Player < Game_Character
  def move_by_input
    return if !movable? || $game_map.interpreter.running?
	return unless Input.dir4 > 0
    if Input.dir4 == direction
		move_straight(Input.dir4)
	else
		set_direction(Input.dir4)
	end
  end
end

 

Just like in the Pokémon series, it will be common that you still move instead of turning. This was unintended, but I don't know what to do about it.

Share this post


Link to post
Share on other sites

I've made a little script based from what you've given me, it's not much but it's more accurate.

Oh, this is my first time to post one of my script in the forums. Yay!

 

Okay, here it is: Pokemon Movement

 

* Gave you both my special thanks... (n_n)

Edited by Xzeph

Share this post


Link to post
Share on other sites

interesting ill see if i can event something to make it work.

 

edit: halfway there got the turning working buy using set move route wait 10 frames.

 

Demo: Its not perfect, if you are facing right and you turn left there's a 10 frame pause. whats happening is i dont know how to make the game check if left is being pressed (turn) or held down (moving). but technically its closer than nothing for now.

Player Turn Movement (Eventing Test)

 

I've made a little script based from what you've given me, it's not much but it's more accurate.

Oh, this is my first time to post one of my script in the forums. Yay!

 

Okay, here it is: Pokemon Movement

 

* Gave you both my special thanks... (n_n)

 

nice yours def works how i imagined it should! btw is there a way i can do a script call to force input delay like in your script for events, i want to check it out for other uses.

Edited by marillmau5

Share this post


Link to post
Share on other sites

Let me see what I can do.

But I don't think there is an input delay on event movements with my script.

But if you mean to set the input delay to zero, I can do that, pretty simple.

I could do a switch to disable/enable the script instead.

Share this post


Link to post
Share on other sites

Hey! I hope they add your script to the master list.

Maybe delay was the wrong wording I used. i was trying to see if I can use a "delay" script call or what you used to check if a player is pressing a button vs. if a player is holding a button. Its what made your script movement so fluent and not have awkward pausing between turns.

 

on my eventing i had

conditional branch if player is facing right

conditional branch if player presses left

set move route - player - turn left - wait 10 seconds

 

This would make it so no matter where i turn theres always a 10 second pause

If I removed that 10 seconds you'd have to tap the button so slightly just for it to work which is barely.

Edited by marillmau5

Share this post


Link to post
Share on other sites

I think

Input.repeat?(sym)

is used for this.

 

From the help file:

 

Input.repeat?(sym) (RGSS3) 
Determines whether the button corresponding to the symbol sym is currently being pressed again.
 
Unlike trigger?, takes into account the repeated input of a button being held down continuously.
 
If the button is being pressed, returns TRUE. If not, returns FALSE.

  • Like 1

Share this post


Link to post
Share on other sites

Does regendo's answer solved your problem, yet? I'm kinda bad in english so I was having a hard time understanding what you really need. You see, English is like my 3rd or 4th language, so I'm kinda weak at it.

 

Wow, aren't I the one who was having the problem here? Now, I was like one of the "solvers". LoL

Edited by Xzeph

Share this post


Link to post
Share on other sites

yeah your script works \o/

was just trying to figure something else out at the end, but all is solved

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted