Gb-studio: [Feature] Store player direction (like position)

Created on 15 Jun 2019  路  4Comments  路  Source: chrismaltby/gb-studio

Is your feature request related to a problem? Please describe.
We can already store the player's position as variables, so why not their direction as well?

(Not quite the same as #33.)

Describe the solution you'd like
It would be nice to be able to store the player's direction as a variable to use when placing the player in other locations based on the stored position.

enhancement

Most helpful comment

Closing, since this is merged in now 馃憤

All 4 comments

you could accomplish this with the if player direction function and a variable

if player direction >
set variable 1
else
if player direction ^
set variable 2

etc

I guess so, but it's pretty convoluted. A simple "get" and "set" (as with the player position) would be much more elegant.

Thanks, for the workaround, though! I'll try it out in the meantime.

I programmed it in and made a pull request for it: https://github.com/chrismaltby/gb-studio/pull/276

Closing, since this is merged in now 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darkhog picture darkhog  路  6Comments

kurosukee picture kurosukee  路  3Comments

mrcampbell picture mrcampbell  路  5Comments

Animacreep picture Animacreep  路  4Comments

timsamoff picture timsamoff  路  4Comments