You already know if 10 placeables on map then thats 10 heartbeats ,so if I can modify to go into trigger say get closest palceable spawn creature.
//////script///////
void ActionCreate(string sCreature, location lLoc)
{
CreateObject(OBJECT_TYPE_CREATURE, sCreature, lLoc);
}
void main()
{ object oCreature = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
if (GetIsObjectValid(oCreature) == TRUE && GetDistanceToObject(oCreature) < 10.0)
{
effect eMind = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
string sCreature = "NW_SKELWARR01";
// * 10% chance of a skeleton chief instead
if (Random(100) > 90)
{
sCreature = "NW_SKELCHIEF"; }
location lLoc = GetLocation(OBJECT_SELF);
DelayCommand(0.3, ActionCreate(sCreature, lLoc));
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMind, GetLocation(OBJECT_SELF)); SetPlotFlag(OBJECT_SELF, FALSE);
DestroyObject(OBJECT_SELF, 0.5);
}
}
Modifié par Knight_Shield, 18 août 2012 - 05:04 .





Retour en haut






