hi statusEffect>Effect End Settings> Time> Value> 1800 (30 minutes)
1. Is there a way to get the remaining time of the status effect applied in the running game from the script? (to display in ui) like ORK.Game.ActiveGroup.Leader.Status.Effects.GETRemainigtime?
And how do i get the original "end after game time" before it is deducted?
2.How to get combatant's total walkspeed value with script? (All walk bonuses + combatant's movementsettings> "walk speed value"(formula) = total)
1) Yes, but you have to go through all currently applied effects to find the one you're looking for, e.g.: for(int i=0; i<combatant.Status.Effects.Count; i++) { if(combatant.Status.Effects[i].ID == effectID) { float remainingTime = combatant.Status.Effects[i].EndAfter; float startTime = combatant.Status.Effects[i].EndAfterMax; } } combatant is the combatant (e.g. ORK.Game.ActiveGroup.Leader), effectID is the ID/index of the status effect.
2) You can get the walk speed with all bonuses (and other speed values) like this: float walkSpeed = combatant.Object.GetMoveSpeed(MoveSpeedType.Walk);
Post edited by gamingislove on
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
for(int i=0; i<combatant.Status.Effects.Count; i++)
{
if(combatant.Status.Effects[i].ID == effectID)
{
float remainingTime = combatant.Status.Effects[i].EndAfter;
float startTime = combatant.Status.Effects[i].EndAfterMax;
}
}
combatant is the combatant (e.g. ORK.Game.ActiveGroup.Leader), effectID is the ID/index of the status effect.
2) You can get the walk speed with all bonuses (and other speed values) like this:
float walkSpeed = combatant.Object.GetMoveSpeed(MoveSpeedType.Walk);
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!