Ok I put this in a trigger near placable.
void main()
{object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
int nActive = GetLocalInt(OBJECT_SELF, "ACTIVE");
if ((nActive == 0) !=0)
{
object oStatue = GetNearestObjectByTag("skeletonbones");
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_COM_CHUNK_STONE_MEDIUM), GetLocation(oStatue));ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(GetCurrentHitPoints(oStatue)), oStatue);
object oTarget = GetNearestObjectByTag("skeletonbones");location lTarget = GetLocation(oTarget);
object oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "NW_SKELWARR01", lTarget);
//effect eMind = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
SetIsTemporaryEnemy(oPC, oSpawn);
//AssignCommand(oSpawn, ActionAttack(oPC));DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_AC_BONUS), GetLocation(oSpawn)));SetLocalInt(OBJECT_SELF, "ACTIVE", 1);
DelayCommand(300.0, SetLocalInt(OBJECT_SELF, "ACTIVE", 1));
}
if ((nActive == 1) !=0)
{
return;
}
}
I would like to add this but cant seem to get it .
if (Random(100) > 90) { sCreature = "NW_SKELCHIEF"; }
I also have a different script to respawn placable so I could remove it respawning from this one.
Modifié par Knight_Shield, 18 août 2012 - 11:57 .