|
ERAiAPI
|
Represents a Goal object. More...
#include <GoalFunc.hpp>
Public Member Functions | |
| void | AddGoalScopedTeamRecord (int cooridnateType, int target, float p3) |
| void | AddLifeParentSubGoal (float life) |
| Adds the given amount of time to the parent's, grand-parent's, grand-grand-parent's..., life. | |
| GoalFunc * | AddSubGoal (int goalId, float life, float goalParam0=0, float goalParam1=0, float goalParam2=0, float goalParam3=0, float goalParam4=0, float goalParam5=0, float goalParam6=0, float goalParam7=0, float goalParam8=0, float goalParam9=0, float goalParam10=0, float goalParam11=0, float goalParam12=0) |
| Adds subgoal to this goal's subgoal queue. | |
| GoalFunc * | AddSubGoal_Front (int goalId, float life, float goalParam0, float goalParam1, float goalParam2) |
| Adds subgoal to the front of this goal's subgoal queue. | |
| void | AdjustDisplacement (int p1, int p2, float p3, float p4, float p5) |
| void | ClearSeriesSubGoal (int goalId) |
| Clears all goals in the subgoal queue from front to back until it reaches a goal whose id isn't the given id. Example: SubGoal Queue [2000, 2000, 2001, 2001, 2000, 2003] ClearSeriesSubGoal(2000) -> [2001, 2001, 2000, 2003] ClearSeriesSubGoal(anything else) -> no change. | |
| void | ClearSubGoal () |
| Clears goal's subgoal queue. | |
| int | GetBattleGoalId () |
| Returns the AI's battle goal id. | |
| GOAL_RESULT | GetLastResult () |
| Returns the goal's last updated result. | |
| GOAL_RESULT | GetLastSubGoalResult () |
| Returns the goal's active subgoal's last updated result (from Update function). | |
| GoalFunc * | GetLatestAddGoalFunc () |
| Returns the last subgoal in the goal's subgoal queue (the last subgoal added). | |
| float | GetLife () |
| Returns the goal's life. | |
| float | GetNumber (int index) |
| Returns the number stored at the given index (0-7) | |
| float | GetParam (int paramIndex) |
| Returns the goal's param at the given index (the params used at the time of the goal's creation, e.g AddSubGoal). If the param doesn't exist, returns 0. | |
| float | GetParamBool (int paramIndex) |
| Returns true if the goal's param at the given index is bigger than 0, otherwise false (the params used at the time of the goal's creation). If the param doesn't exist, returns false. Lua's "true" = 1.0. | |
| int | GetSubGoalNum () |
| Returns the number of subgoals in the goal's subgoal queue. | |
| float | GetTimer (int index) |
| Returns the given timer's remaining time. | |
| bool | IsExistParam (int paramIndex) |
| Returns true if the index is less than 8, or if the goal was created with the given param, otherwise false. Example: local child = goal:AddSubGoal(GOAL_COMMON_CommonAttack, 5, 3000, TARGET_ENE_0, 999, 180, 1, 180, true, true, false, false, 0, 0) yields child:IsExistParam(11) = true, child:IsExistParam(12) = false. | |
| bool | IsFinishTimer (int index) |
| Returns true if the given timer's remaining time is less than or equal to 0, otherwise false. | |
| bool | IsFinishTimerForTurnBeforeAtk () |
| Returns true if the timer to turn before executing the animation is less than or equal to 0, otherwise false. Used with CommonAttack's turnTime, turnFaceAngle. | |
| bool | IsInterruptSubGoalChanged () |
| Returns true if subgoals were added or cleared by the interrupt. | |
| void | SetEnableComboAttackCancel () |
| Does nothing. | |
| GoalFunc * | SetFailedEndOption (AI_GOAL_FAILED_END_OPT failedEndOption) |
| Set what to do on goal failure. | |
| GoalFunc * | SetLifeEndSuccess (bool enable) |
| Set whether the goal's life running out is a success or failure (goal will end either way). Default: GOAL_RESULT_Failed | |
| void | SetManagementGoal () |
| void | SetNumber (int index, float value) |
| Store the given number in the given index (0-7). | |
| GoalFunc * | SetTargetAngle (int angleObserverSlot, float angleStart, float angleWidth) |
| Creates an angle observer with the given parameters. The observer can normally be accessed with INTERUPT_TargetOutOfAngle, IsTargetOutOfAngleInterruptSlot. No longer used in ER (IsTargetOutOfAngleInterruptSlot is empty). | |
| GoalFunc * | SetTargetAngle (float angleStart, float angleWidth) |
| Creates an angle observer with the given parameters. The observer can normally be accessed with INTERUPT_TargetOutOfAngle, IsTargetOutOfAngleInterruptSlot. No longer used in ER (IsTargetOutOfAngleInterruptSlot is empty). Equivalent to SetTargetAngle(-1, angleStart, angleWidth) | |
| GoalFunc * | SetTargetOriginRange (int rangeObserverSlot, float minDistance, float maxDistance) |
| Creates a range observer with the given parameters. The observer measures range without taking the AI's hit radius into account. The observer can normally be accessed with INTERUPT_TargetOutOfRange, IsTargetOutOfRangeInterruptSlot. No longer used in ER (IsTargetOutOfRangeInterruptSlot is empty). | |
| GoalFunc * | SetTargetOriginRange (float minDistance, float maxDistance) |
| Creates a range observer with the given parameters. The observer measures range without taking the AI's hit radius into account. The observer can normally be accessed with INTERUPT_TargetOutOfRange, IsTargetOutOfRangeInterruptSlot. No longer used in ER (IsTargetOutOfRangeInterruptSlot is empty). Equivalent to SetTargetOriginRange(-1, minDistance, maxDistance) | |
| GoalFunc * | SetTargetRange (int rangeObserverSlot, float minDistance, float maxDistance) |
| Creates a range observer with the given parameters. The observer measures range with the AI's hit radius taken into account. The observer can normally be accessed with INTERUPT_TargetOutOfRange, IsTargetOutOfRangeInterruptSlot. No longer used in ER (IsTargetOutOfRangeInterruptSlot is empty). | |
| GoalFunc * | SetTargetRange (float minDistance, float maxDistance) |
| Creates a range observer with the given parameters. The observer measures range with the AI's hit radius taken into account. The observer can normally be accessed with INTERUPT_TargetOutOfRange, IsTargetOutOfRangeInterruptSlot. No longer used in ER (IsTargetOutOfRangeInterruptSlot is empty). Equivalent to SetTargetRange(-1, minDistance, maxDistance) | |
| void | SetTimer (int index, float value) |
| Sets the given timer to the given value. Timers constantly tick down until they reach 0. | |
| void | SetTimerForTurnBeforeAtk (float value) |
| Sets the goal's timer for turning to the given value. The timer constantly ticks down until it reaches 0. Used with GOAL_COMMON_CommonAttack's turnTime, turnFaceAngle. | |
| GoalFunc * | TimingSetNumber (int index, float value, AI_TIMING_SET when) |
| ets the goal's number to the value at the moment given. | |
| GoalFunc * | TimingSetTimer (int index, float value, AI_TIMING_SET when) |
| Sets the goal's timer to the value at the moment given. | |
| GOAL_RESULT | UpdateSubGoal () |
| Updates active subgoal (including all normal update functionalities, such as executing the goal's "Update" method). | |
Represents a Goal object.
Definition at line 8 of file GoalFunc.hpp.
| void GoalFunc::AddGoalScopedTeamRecord | ( | int | cooridnateType, |
| int | target, | ||
| float | p3 ) |
| cooridnateType | |
| target | |
| p3 |
| void GoalFunc::AddLifeParentSubGoal | ( | float | life | ) |
Adds the given amount of time to the parent's, grand-parent's, grand-grand-parent's..., life.
| life | life to add |
| GoalFunc * GoalFunc::AddSubGoal | ( | int | goalId, |
| float | life, | ||
| float | goalParam0 = 0, | ||
| float | goalParam1 = 0, | ||
| float | goalParam2 = 0, | ||
| float | goalParam3 = 0, | ||
| float | goalParam4 = 0, | ||
| float | goalParam5 = 0, | ||
| float | goalParam6 = 0, | ||
| float | goalParam7 = 0, | ||
| float | goalParam8 = 0, | ||
| float | goalParam9 = 0, | ||
| float | goalParam10 = 0, | ||
| float | goalParam11 = 0, | ||
| float | goalParam12 = 0 ) |
Adds subgoal to this goal's subgoal queue.
| goalId | goal to add |
| life | life of goal |
| goalParam0 | 0th goal param |
| goalParam1 | 1st goal param |
| goalParam2 | 2nd goal param |
| goalParam3 | 3rd goal param |
| goalParam4 | 4th goal param |
| goalParam5 | 5th goal param |
| goalParam6 | 6th goal param |
| goalParam7 | 7th goal param |
| goalParam8 | 8th goal param |
| goalParam9 | 9th goal param |
| goalParam10 | 10th goal param |
| goalParam11 | 11th goal param |
| goalParam12 | 12th goal param |
| GoalFunc * GoalFunc::AddSubGoal_Front | ( | int | goalId, |
| float | life, | ||
| float | goalParam0, | ||
| float | goalParam1, | ||
| float | goalParam2 ) |
Adds subgoal to the front of this goal's subgoal queue.
| goalId | goal to add |
| life | life of goal |
| goalParam0 | 0th goal param |
| goalParam1 | 1st goal param |
| goalParam2 | 2nd goal param |
| void GoalFunc::AdjustDisplacement | ( | int | p1, |
| int | p2, | ||
| float | p3, | ||
| float | p4, | ||
| float | p5 ) |
| p1 | |
| p2 | |
| p3 | |
| p4 | |
| p5 |
| void GoalFunc::ClearSeriesSubGoal | ( | int | goalId | ) |
Clears all goals in the subgoal queue from front to back until it reaches a goal whose id isn't the given id. Example: SubGoal Queue [2000, 2000, 2001, 2001, 2000, 2003] ClearSeriesSubGoal(2000) -> [2001, 2001, 2000, 2003] ClearSeriesSubGoal(anything else) -> no change.
| goalId | goal series to clear |
| void GoalFunc::ClearSubGoal | ( | ) |
Clears goal's subgoal queue.
| int GoalFunc::GetBattleGoalId | ( | ) |
Returns the AI's battle goal id.
| GOAL_RESULT GoalFunc::GetLastResult | ( | ) |
Returns the goal's last updated result.
| GOAL_RESULT GoalFunc::GetLastSubGoalResult | ( | ) |
Returns the goal's active subgoal's last updated result (from Update function).
| GoalFunc * GoalFunc::GetLatestAddGoalFunc | ( | ) |
Returns the last subgoal in the goal's subgoal queue (the last subgoal added).
| float GoalFunc::GetLife | ( | ) |
Returns the goal's life.
| float GoalFunc::GetNumber | ( | int | index | ) |
Returns the number stored at the given index (0-7)
| index | number index |
| float GoalFunc::GetParam | ( | int | paramIndex | ) |
Returns the goal's param at the given index (the params used at the time of the goal's creation, e.g AddSubGoal). If the param doesn't exist, returns 0.
| paramIndex | param index |
| float GoalFunc::GetParamBool | ( | int | paramIndex | ) |
Returns true if the goal's param at the given index is bigger than 0, otherwise false (the params used at the time of the goal's creation). If the param doesn't exist, returns false. Lua's "true" = 1.0.
| paramIndex | param index |
| int GoalFunc::GetSubGoalNum | ( | ) |
Returns the number of subgoals in the goal's subgoal queue.
| float GoalFunc::GetTimer | ( | int | index | ) |
Returns the given timer's remaining time.
| index | timer index |
| bool GoalFunc::IsExistParam | ( | int | paramIndex | ) |
Returns true if the index is less than 8, or if the goal was created with the given param, otherwise false. Example: local child = goal:AddSubGoal(GOAL_COMMON_CommonAttack, 5, 3000, TARGET_ENE_0, 999, 180, 1, 180, true, true, false, false, 0, 0) yields child:IsExistParam(11) = true, child:IsExistParam(12) = false.
| paramIndex | param index |
| bool GoalFunc::IsFinishTimer | ( | int | index | ) |
Returns true if the given timer's remaining time is less than or equal to 0, otherwise false.
| index | timer index |
| bool GoalFunc::IsFinishTimerForTurnBeforeAtk | ( | ) |
Returns true if the timer to turn before executing the animation is less than or equal to 0, otherwise false. Used with CommonAttack's turnTime, turnFaceAngle.
| bool GoalFunc::IsInterruptSubGoalChanged | ( | ) |
Returns true if subgoals were added or cleared by the interrupt.
| void GoalFunc::SetEnableComboAttackCancel | ( | ) |
Does nothing.
| GoalFunc * GoalFunc::SetFailedEndOption | ( | AI_GOAL_FAILED_END_OPT | failedEndOption | ) |
Set what to do on goal failure.
| failedEndOption | what to do on goal failure |
| GoalFunc * GoalFunc::SetLifeEndSuccess | ( | bool | enable | ) |
Set whether the goal's life running out is a success or failure (goal will end either way). Default: GOAL_RESULT_Failed
| enable | enable |
| void GoalFunc::SetManagementGoal | ( | ) |
| void GoalFunc::SetNumber | ( | int | index, |
| float | value ) |
Store the given number in the given index (0-7).
| index | number index |
| value | value |
| GoalFunc * GoalFunc::SetTargetAngle | ( | float | angleStart, |
| float | angleWidth ) |
Creates an angle observer with the given parameters. The observer can normally be accessed with INTERUPT_TargetOutOfAngle, IsTargetOutOfAngleInterruptSlot. No longer used in ER (IsTargetOutOfAngleInterruptSlot is empty). Equivalent to SetTargetAngle(-1, angleStart, angleWidth)
| angleStart | angle offset from front |
| angleWidth | angle width |
| GoalFunc * GoalFunc::SetTargetAngle | ( | int | angleObserverSlot, |
| float | angleStart, | ||
| float | angleWidth ) |
Creates an angle observer with the given parameters. The observer can normally be accessed with INTERUPT_TargetOutOfAngle, IsTargetOutOfAngleInterruptSlot. No longer used in ER (IsTargetOutOfAngleInterruptSlot is empty).
| angleObserverSlot | observer slot |
| angleStart | angle offset from front |
| angleWidth | angle width |
| GoalFunc * GoalFunc::SetTargetOriginRange | ( | float | minDistance, |
| float | maxDistance ) |
Creates a range observer with the given parameters. The observer measures range without taking the AI's hit radius into account. The observer can normally be accessed with INTERUPT_TargetOutOfRange, IsTargetOutOfRangeInterruptSlot. No longer used in ER (IsTargetOutOfRangeInterruptSlot is empty). Equivalent to SetTargetOriginRange(-1, minDistance, maxDistance)
| minDistance | minimum distance |
| maxDistance | maximum distance |
| GoalFunc * GoalFunc::SetTargetOriginRange | ( | int | rangeObserverSlot, |
| float | minDistance, | ||
| float | maxDistance ) |
Creates a range observer with the given parameters. The observer measures range without taking the AI's hit radius into account. The observer can normally be accessed with INTERUPT_TargetOutOfRange, IsTargetOutOfRangeInterruptSlot. No longer used in ER (IsTargetOutOfRangeInterruptSlot is empty).
| rangeObserverSlot | observer slot |
| minDistance | minimum distance |
| maxDistance | maximum distance |
| GoalFunc * GoalFunc::SetTargetRange | ( | float | minDistance, |
| float | maxDistance ) |
Creates a range observer with the given parameters. The observer measures range with the AI's hit radius taken into account. The observer can normally be accessed with INTERUPT_TargetOutOfRange, IsTargetOutOfRangeInterruptSlot. No longer used in ER (IsTargetOutOfRangeInterruptSlot is empty). Equivalent to SetTargetRange(-1, minDistance, maxDistance)
| minDistance | minimum distance |
| maxDistance | maximum distance |
| GoalFunc * GoalFunc::SetTargetRange | ( | int | rangeObserverSlot, |
| float | minDistance, | ||
| float | maxDistance ) |
Creates a range observer with the given parameters. The observer measures range with the AI's hit radius taken into account. The observer can normally be accessed with INTERUPT_TargetOutOfRange, IsTargetOutOfRangeInterruptSlot. No longer used in ER (IsTargetOutOfRangeInterruptSlot is empty).
| rangeObserverSlot | observer slot |
| minDistance | minimum distance |
| maxDistance | maximum distance |
| void GoalFunc::SetTimer | ( | int | index, |
| float | value ) |
Sets the given timer to the given value. Timers constantly tick down until they reach 0.
| index | timer index (0-15) |
| value | time [seconds] |
| void GoalFunc::SetTimerForTurnBeforeAtk | ( | float | value | ) |
Sets the goal's timer for turning to the given value. The timer constantly ticks down until it reaches 0. Used with GOAL_COMMON_CommonAttack's turnTime, turnFaceAngle.
| value | time [seconds] |
| GoalFunc * GoalFunc::TimingSetNumber | ( | int | index, |
| float | value, | ||
| AI_TIMING_SET | when ) |
ets the goal's number to the value at the moment given.
| index | number index |
| value | value |
| when | when to set number |
| GoalFunc * GoalFunc::TimingSetTimer | ( | int | index, |
| float | value, | ||
| AI_TIMING_SET | when ) |
Sets the goal's timer to the value at the moment given.
| index | timer index |
| value | time [seconds] |
| when | when to set the given timer to the given value |
| GOAL_RESULT GoalFunc::UpdateSubGoal | ( | ) |
Updates active subgoal (including all normal update functionalities, such as executing the goal's "Update" method).