Actor property PlayerRef Auto ;Changed the type since IsEquipped is an Actor functionObjectReference property Stump AutoObjectReference property CutStump AutoMiscObject Property CutLog AutoSpell Property Coldspell AutoAuto State NotEntered Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, Bool abPowerAttack, Bool abSneakAttack, Bool abBashAttack, Bool abHitBlocked) If(akAggressor == PlayerRef)If((PlayerRef.GetEquippedSpell() == Coldspell) || (PlayerRef.GetEquippedSpell(True) == Coldspell)) ;Debug.Trace("The player hit me!") Stump.Disable() CutStump.Enable() PlayerRef.AddItem(CutLog, 1, False) GoToState("Done") Else Debug.Notification("You need to use a Woodcutters Axe to chop the tree") EndIf EndIf EndEventEndState
Actor property PlayerRef Auto ;Changed the type since IsEquipped is an Actor functionObjectReference property Stump AutoObjectReference property CutStump AutoMiscObject Property CutLog AutoWeapon Property WoodAxe AutoAuto State NotEntered Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, Bool abPowerAttack, Bool abSneakAttack, Bool abBashAttack, Bool abHitBlocked) If(akAggressor == PlayerRef)If((PlayerRef.GetEquippedWeapon() == WoodAxe) || (PlayerRef.GetEquippedWeapon(True) == WoodAxe)) ;Debug.Trace("The player hit me!") Stump.Disable() CutStump.Enable() PlayerRef.AddItem(CutLog, 1, False) GoToState("Done") Else Debug.Notification("You need to use a Woodcutters Axe to chop the tree") EndIf EndIf EndEventEndState
I have used this script, above, for some time without any problems for cutting down trees. I thought I could use this script, amended, to register when an object is hit by a spell - in my case a movable static, a fire volume.
I changed the script, just the essentials for now to see if it worked, but it won't compile.
The amended script is the top one - for some reason this editor is messed up.
These are the errors...
psc(12,14): argument aisource is not specified and has no default value
psc(12,61): type mismatch on parameter 1 (did you forget a cast?)
Thanks for your time.