Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MoveType toward/away logic is not entirely accurate #1644

Closed
CherryDT opened this issue Feb 23, 2019 · 3 comments

Comments

@CherryDT
Copy link

commented Feb 23, 2019

RM logic for towards/away move types is:

  • If event is not in sight, move randomly
  • If event is in sight, move towards/away from hero with 80% chance, randomly with 10% chance, forwards without direction change with 10% chance.

Definition for "in sight": Screen coordinates (the same that are retrieved in the "Change Variable" event) of event are x >= -32 && x <= 352 && y >= -32 && y <= 272.

@fdelapena fdelapena added this to the 0.6.x milestone Mar 1, 2019

@fmatthew5876

This comment has been minimized.

Copy link
Contributor

commented Mar 15, 2019

Are these screen coordinates affected by panning?

EDIT: Looks like yes

@fmatthew5876

This comment has been minimized.

Copy link
Contributor

commented Mar 15, 2019

I surrounded a move towards player event with obstacles and ran a test.

When stop_count <= 60 each frame the event will try to move and be blocked, not changing direction. On the 60th frame, the event will change direction and stop_count goes back to 0.

@fmatthew5876

This comment has been minimized.

Copy link
Contributor

commented Mar 16, 2019

On non-looping maps, if you move such that the event is -2 tiles off the left edge of the screen, the screen x position is -24.

If you do this on looping maps, the x position wraps to (map_width - 1) * 16 - 8

That means for non-looping the x=-2 event would follow you, but in looping it would move randomly. A minor RPG_RT bug I guess ❗️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.