Hi all!
I'm working on a script that will create a visual effect on the player which was the most recent target of a creature, and would want to place this in the "creature heartbeat" area. I'm new to scripting, so I've patched this together from another script I've gotten to work, but I'm having trouble with this one. Can anyone help get me back on track and show me what I'm doing wrong?
Thanks so much!
void main(){
object GetAttackTarget(object oCreature=OBJECT_SELF)object GetAttemptedAttackTarget (object oCreature=OBJECT_SELF;
if (!GetIsPC(oPC)) return;
object oTarget;oTarget = oPC;
int nInt;nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_BLOOD_CRT_RED), oTarget);else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_BLOOD_CRT_RED), GetLocation(oTarget));
oTarget = OBJECT_SELF;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_BLOOD_CRT_RED), oTarget);else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_BLOOD_CRT_RED), GetLocation(oTarget));
}