playerref = game.getplayer()
(in the script)
or
Actor properties PlayerRef auto
(thus setting it is the proprieties tab)
Function DamOrKill(Float Damage, Actor Target, Actor Attacker) Global ; I am unsure if Global means it is used globally in other scrips or some other meaning. Wiki is not clear TO ME on this. if damage >= Target.getav("health") attacker.pushactoraway(Target, 7) target.Kill(attacker) else Target.DamageAV("health", damage) endifendFunction
quest property aadpMainQuest autoaadpMainQuest.DamOrKill(Damage, Target, Attacker)
aadpMainQuest Property mainQuest AutomainQuest.DamOrKill (Damage, Target, Attacker)DamOrKill () is not found by the compiler because it doesn't exist in Quest but it does in aadpMainQuest.
aadpMainQuest property aadpMainQuest autoaadpMainQuest.DamOrKill(Damage, Target, Attacker)Also, I'd advise being wary of using the same name for an object/property and a script, as this can make it ambiguous as to whether you're calling a global or a non-global variable. I'm not sure how the compiler will handle that, but it will at least make a script more difficult to read.
MyType.MyFunction(parameters)And if it were not global I would call it like this:
MyType Property MyProperty auto...MyProperty.MyFunction(parameters)