Overriding the Default Movement Direction? in Developer Help
|
|
I have been trying to figure out the lesser-known isometric side of BYOND, to hopefully create a working skeleton for an RTS game. However, the default movement direction when in isometric mode is only suitable for games like Q*bert, not mouse controlled, real time strategies like Starcraft or Age of Empires.
What I am trying to do is override the default direction that the player's mob moves when pressing an arrow key (if it also corrects the movement of player controlled "unit" mobs, then that's even better). The goal here is to make it so that movement acts like it does in normal mode, even though you are really in isometric mode. In other words, pressing the "Up" key, for example, moves the map Up, even though Up is really Northwest.
Basically, each direction of movement would need to be output as rotated 45° counterclockwise. I have tried playing with the North(), South(), procs etc., but I just ended up with runtime errors each time I pressed an arrow key. So I decided to come here for some help. I can imagine that others might find the solution to this useful as well. Something like this is pretty much required for making isometric RTS games.
Any help with this would be awesome!
I am still learning Dream Maker, so sample code would also be helpful.
|
I'm not really sure if the loc var should be retained.