This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
code:pawn [2015/05/09 15:43] 82.247.193.95 |
code:pawn [2015/09/06 11:59] (current) 82.247.193.95 [TODO] |
||
---|---|---|---|
Line 13: | Line 13: | ||
* CharacterId : only used for pawns controlled by the player. It is a unique id that must be set. It can be ignored for pawn controlled by AI. | * CharacterId : only used for pawns controlled by the player. It is a unique id that must be set. It can be ignored for pawn controlled by AI. | ||
* State : This is the initial state for the pawn. Usually it is "Idle". | * State : This is the initial state for the pawn. Usually it is "Idle". | ||
- | * Attack Description : The attack to execute when the "Attack" option is chosen for the pawn. | + | * [[code:attack|Attack Description]] : The attack to execute when the "Attack" option is chosen for the pawn. This is a description in a statistics point of view. The animations and effects to play are decided by the Pawn Action script. |
* Attack Anchor Radius : This is the radius of a imaginary sphere containg the mesh. It is used to compute the displacmeent of a pawn when doing a close range attack so two pawns never penetrate each other. | * Attack Anchor Radius : This is the radius of a imaginary sphere containg the mesh. It is used to compute the displacmeent of a pawn when doing a close range attack so two pawns never penetrate each other. | ||
* Animation State : For each state, you must specify an animation to play with an animation trigger and an animation state name. This means that the pawn as to have a Animator with a animation graph. If no animation is necessary for a given state, leave blank. | * Animation State : For each state, you must specify an animation to play with an animation trigger and an animation state name. This means that the pawn as to have a Animator with a animation graph. If no animation is necessary for a given state, leave blank. | ||
Line 50: | Line 50: | ||
Contains the ui information. Not much for now since it only contains a sprite to show in the turn history. | Contains the ui information. Not much for now since it only contains a sprite to show in the turn history. | ||
- | ==== Pawn Actions ==== | + | ===== Pawn Actions ===== |
Stores the descriptions of all the actions available during a fight. This is where you choose what animations to play to move, how much to move, etc. This is a visual description of the actions. | Stores the descriptions of all the actions available during a fight. This is where you choose what animations to play to move, how much to move, etc. This is a visual description of the actions. | ||
* Default Attack : This is the description for the default physical attack. | * Default Attack : This is the description for the default physical attack. | ||
Line 65: | Line 65: | ||
* Attack Distance : Distance form the enemy. The pawn will run to the enemy until he is "Attack Distance" unit away from the enemy and then start the attack animation. To compute the exact distance, you need to take into account the PawnBehavior.AttackAnchorRadius. So in the end, the real distance between two pawns P1 and P2 is their initial distance minus the Attack Distance minus both attack anchor radius. | * Attack Distance : Distance form the enemy. The pawn will run to the enemy until he is "Attack Distance" unit away from the enemy and then start the attack animation. To compute the exact distance, you need to take into account the PawnBehavior.AttackAnchorRadius. So in the end, the real distance between two pawns P1 and P2 is their initial distance minus the Attack Distance minus both attack anchor radius. | ||
- | ==== TODO ==== | + | ===== TODO ===== |
Some reorganizations of all those information could be done: | Some reorganizations of all those information could be done: | ||
- | * The Pawn UI only contains one element. Having a script for one element is kind of stupid. | ||
* In Pawn Statistics IsControlledByPlayer should be private. The game should decide what pawns are playable or not. | * In Pawn Statistics IsControlledByPlayer should be private. The game should decide what pawns are playable or not. | ||