Both the target and ashpile are set right as the script works fine if I do not do the .FindClosestReferenceOfTypeFromRef line.
This is an AOE type spell so yes target is what I need.
And the rest of the script works fine if I remove the check for the ashpile being near the target.
4 feet (80 units) should be more than enough, more than that and I risk getting other actor that are near by.
This ashpile is attached to the actor so it technically should be ZERO units away...
...er... maybe that is the issue...it is attached to the actor so it is not in the world!

Ok then I will drop a token on the dead vampire instead. Thanks anyway guys.
Scriptname aadpAquireActors extends activemagiceffectActivator Property AshPileObject AutoGlobalVariable Property aadpClassicVampires AutoFaction Property VampireFaction AutoWEAPON Property aadpMrPointy AutoKeyword Property Vampire AutoEvent OnEffectStart(Actor akTarget, Actor akCaster)actor Target = akTargetif (Target.IsDead()) || (target.IsDisabled())if (Target.haskeyword(vampire)) && (Target.IsDead())Objectreference DustPile = Game.FindClosestReferenceOfTypeFromRef((AshPileObject.GetBaseObject()), Target, 80.0) ; <-- compile error if aadpClassicVampires.getvalue() > 0 && DustPile == none target.SetCriticalStage(Target.CritStage_DisintegrateStart) target.SetAlpha(0.0, true) target.AttachAshPile(AshPileObject) target.SetCriticalStage(target.CritStage_DisintegrateEnd) target.additem(aadpMrPointy, 1) ;debug.MessageBox("Ashpile set.") endifendifendevent
The compile error: "aadpAquireActors.psc(61,81): GetBaseObject is not a function or does not exist