[dismiss]
This wiki is a copy of the original Skyrim CK wiki created and maintained by the UESP.net. See CreationKit:Copy Notice for more info.
Difference between revisions of "Actor Script"
Jump to navigation
Jump to search
→Events
imported>Jog |
imported>Jog (→Events) |
||
Line 518: | Line 518: | ||
== Events == | == Events == | ||
'''Event [[OnCombatStateChanged - Actor|OnCombatStateChanged]](Actor akTarget, int aeCombatState)''' | |||
*Sent when this actor's combat state changes. | |||
'''Event [[OnDeath - Actor|OnDeath]](Actor akKiller)''' | |||
*Event received when this actor dies. | |||
'''Event [[OnDying - Actor|OnDying]](Actor akKiller)''' | |||
*Event received when this actor begins to die. | |||
'''Event [[OnEnterBleedout - Actor|OnEnterBleedout]]()''' | |||
*Event received when this object enters bleedout. | |||
'''Event [[OnGetUp - Actor|OnGetUp]](ObjectReference akFurniture)''' | |||
*Event received when this actor gets up off the specified furniture. | |||
'''Event [[OnLocationChange - Actor|OnLocationChange]](Location akOldLoc, Location akNewLoc)''' | |||
*Event received when the actor moves from one location to another. | |||
'''Event [[OnObjectEquipped - Actor|OnObjectEquipped]](Form akBaseObject, ObjectReference akReference)''' | |||
*Event received when this actor equips an object. | |||
'''Event [[OnObjectUnequipped - Actor|OnObjectUnequipped]](Form akBaseObject, ObjectReference akReference)''' | |||
*Event received when this actor unequips an object. | |||
'''Event [[OnPackageChange - Actor|OnPackageChange]](Package akOldPackage)''' | |||
*Event received when this actor changes away from a package. | |||
'''Event [[OnPackageEnd - Actor|OnPackageEnd]](Package akOldPackage)''' | |||
*Event received when this actor ends a package. | |||
'''Event [[OnPackageStart - Actor|OnPackageStart]](Package akNewPackage)''' | |||
*Event received when this actor starts running a new package. | |||
'''Event [[OnRaceSwitchComplete - Actor|OnRaceSwitchComplete]]()''' | |||
*Event received when this actor finishes switching races. | |||
'''Event [[OnSit - Actor|OnSit]](ObjectReference akFurniture)''' | |||
*Event received when this actor sits on the specified furniture. | |||
== Notes == | == Notes == | ||
* You may not attach a script to an actor if that actor would be used by a leveled actor list. If an actor is used in a leveled actor list, its "Scripts" section will be disabled. | * You may not attach a script to an actor if that actor would be used by a leveled actor list. If an actor is used in a leveled actor list, its "Scripts" section will be disabled. | ||
** There is a workaround in this in cases where you need actors to be both leveled and scripted - you can create a constant/self magic effect and apply that at the race level. For example, the '''FXDragonBloodDamageScript''' handles applying some special blood FX to dragons through combat. Since dragons are used to populate leveled lists, however, we attach this script to '''AbFXDragonBloodDamage''', which is an effect on the '''AbDragonBloodFX''' spell. That's then assigned as a special racial ability of the '''DragonRace'''. You can look at a similar example in how the WispMothers work, too. | ** There is a workaround in this in cases where you need actors to be both leveled and scripted - you can create a constant/self magic effect and apply that at the race level. For example, the '''FXDragonBloodDamageScript''' handles applying some special blood FX to dragons through combat. Since dragons are used to populate leveled lists, however, we attach this script to '''AbFXDragonBloodDamage''', which is an effect on the '''AbDragonBloodFX''' spell. That's then assigned as a special racial ability of the '''DragonRace'''. You can look at a similar example in how the WispMothers work, too. |