I'm sorry for asking a "How to code" question, but for some reason I can't seem to think of a way to code this efficiently. I've tried a few things, but they all seem to need debugging, and don't work correctly; I fear i'm prolly doing it completely wrong.
Okay, so.. I have:
Water Turf:
Consumes 3 movement
Forest Turf:
Consumes 2 movement
Mountain Turf:
Consumes 3 movement
Grass Turf:
Consumes 1 movement
City Turf:
Consumes 2 movement, except by Vehicles.
I have a Selection proc working fine, it selects the unit, ect. What i'm trying to do is make it so the game will determine which turfs that unit can move to with it's remaining "Movement", and clicking that turf will move to it. All the turfs it can move too should probably go in a List, I know that much, but I can't figure out a good way to figure out how far it can move.
ID:159808
Jan 10 2009, 7:41 am
|
|
Jan 10 2009, 7:48 am
|
|
You can use a simple proc that returns how much restriction a turf has.
|
Thank you, this was very useful. Can't believe I didn't think of that xD It's fairly simple too.
|
You can simply implement it as a variable on the turfs, a sufficient and well object-oriented method. Pretty simple. >_> This is how it could look:
turf |