tes3combatSession⚓︎
A structure that keeps track of combat session data.
Properties⚓︎
alchemyPriority
⚓︎
No description yet available.
Returns:
result
(number)
data
⚓︎
A generic lua table that data can be written to, and synced to/from the save. All information stored must be valid for serialization to json.
There is a guide available here on using this table.
Returns:
result
(table)
distance
⚓︎
The combat distance.
Returns:
result
(number)
lastUseTimestamp
⚓︎
Used by the MCP to implement enchanted item cooldown.
Returns:
result
(number)
mobile
⚓︎
Read-only. Convenience access back to the associated actor.
Returns:
result
(tes3mobileActor)
potionUseFlag
⚓︎
No description yet available.
Returns:
result
(number)
selectedAction
⚓︎
The next action. From observed behavior, this roughly maps to:
Value | Behavior |
---|---|
0 | Undecided |
1 | Use melee weapon |
2 | Use marksman weapon |
3 | Use hand to hand attacks |
4 | Use on-touch offensive spell |
5 | Use on-target offensive spell |
6 | Use summon spell |
7 | Flee |
8 | Cast on-self empowering spell (For example, Ancestor Guardian) |
9 | MaybeEquipUseItem? |
10 | Use enchanted item |
Returns:
result
(integer)
selectedItem
⚓︎
A potion or an enchanted item whose spell will be used.
Returns:
result
(tes3itemStack)
selectedShield
⚓︎
Read-only. No description yet available.
Returns:
result
(tes3equipmentStack)
selectedSpell
⚓︎
This field containg the spell the actor is currently casting. If not in casting state this field has nil
value.
Returns:
result
(tes3spell)
selectedWeapon
⚓︎
Read-only. The weapon the actor is using in this combat session.
Returns:
result
(tes3equipmentStack)
spellPriority
⚓︎
No description yet available.
Returns:
result
(number)
Methods⚓︎
changeEquipment
⚓︎
This method equips an item to the mobile in this combat sesion.
myObject:changeEquipment(equipmentStack)
Parameters:
equipmentStack
(tes3equipmentStack): An item to equip.
selectAlchemyWithEffect
⚓︎
Selects the alchemy item with the greatest value, for a given effect ID and loads it into the selectedItem
property.
local result = myObject:selectAlchemyWithEffect(id)
Parameters:
id
(tes3.effect, integer): Maps to values intes3.effect
table.
Returns:
result
(number)