Showing Maximum Move Distance...
SAP_Apps
Member Posts: 77
So here is my question... I'm trying to duplicate the movement of some strategy games... Such as Advanced Wars or FF Tactics... So I have a grid set up and using keyboard for testing can move in the perfect squares of my grid and stuff... Someone help me move my brain along a bit and let me pick your brains... How would I set up the movement to like show the maximum movement...
http://thegia.psy-q.ch/sites/www.thegia.com/gba/wars/media4/wars_ss19.jpg
Such as in that picture? Say I set the maximum movement to 5... Then it would show 5 squares to left/right/up/bottom and the possible with combinations of those ya no?
http://thegia.psy-q.ch/sites/www.thegia.com/gba/wars/media4/wars_ss19.jpg
Such as in that picture? Say I set the maximum movement to 5... Then it would show 5 squares to left/right/up/bottom and the possible with combinations of those ya no?
Comments
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
...
Using the Grid... if I was to assign an AI actor for instance a maximum moveable distance of 3 or 4 grid movements... how could I make him move in the direction of another actor? or if he is a certain range... again 3 grid spaces... make him do something specific... ? this is my first game trying to manipulate an AI not 100% on some techniques to do so...
any ideas? / suggestions
To make an enemy move towards the player (or another actor), you'd just need to know which direction that player was. So you'd be keeping track of its "row" and "column" (self.position.X/game.gridSize) and comparing them with the "row" and "column" of the enemy.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
i can give the AI a max movement of 5.... if the column and row are greater.... you use two movements and move left and down one.... or whatever... then check again... and if its still the same... use two more... then check again... if its still then just auto go down... or if its only one or the other head in that direction.
....
in a nutshell ?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User