Help With Actor Location

I need some help with blueprints for changing actor locations with a grid I’m using these to make a 2d grid since it’ll be better for performance if i make a larger map:



However i’m having issues setting up a system to reduce a character movement stat whenever they move to a new tile i thought something like this may work since the tile size itself is 200, any tips and thanks in advance for the help! :slight_smile:

Hi - me again :slight_smile:

I get a better idea of what you’re talking about here.

What I’d recommend, is only ever use tile coordinates ( tile ID ) in all your code. Whether you’re checking if the tile is available, or the route to the tile is clear, just use the ID ( xy ). The only time you need the actual real-world position, is when the character wants to step there.

Does that make sense?

1 Like

Kinda, so what your saying is I shouldn’t use the tile size but instead look for a change in row or column? If so how would i set it up, as it is now it doesn’t have any x or y just number of rows and columns to create the base grid?

I’m saying you’re introducing real coordinates ( which are more fiddly to work with ) too soon. Just go with row/col until the character actually needs to walk to a tile, then the character code can work out where it is.

For example, is tile occupied?

If you’re just using row/col, the piece standing on the tile can just say ‘I’m on it!’ If you’re already working with real world coords, every piece has to figure out how far they are from some point and whether or not that counts as standing on the tile.

That sort of thing…

1 Like

Okay thanks for the help and sorry i can be a bit dense sometimes lol, It was quite insightful :slight_smile:

After a hour or so tinkering with it i’m proud to say i have the basic idea down as well as a working grid now, thank you so much for the help and hopefully this frankensteins monster will behave :slight_smile:

1 Like