Aller au contenu

Photo

Won't Follow oPC Into... [Solved]


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Morbane

Morbane
  • Members
  • 1 883 messages
 Heya

Script wont get faction member to follow oPC = GetEnteringObject()

Srcipt in next post :whistle:

Modifié par Morbane, 07 juin 2012 - 08:48 .


#2
Morbane

Morbane
  • Members
  • 1 883 messages
//ActionJumpToLocation(...) wont capture oTarget but damage is dealt....
void main()
{

object oPC = GetEnteringObject();

object oTarget = GetFirstFactionMember(oPC, FALSE);

if(!ReflexSave(oPC, 18, SAVING_THROW_TYPE_TRAP))
{
while (GetIsObjectValid(oTarget))
{
if(GetDistanceBetween(oTarget, oPC) < 5.0f)
{
AssignCommand(oTarget, ClearAllActions());
AssignCommand(oTarget, ActionJumpToLocation(GetLocation(GetWaypointByTag("wp_bleakborn_pit"))));

ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(d6(10), DAMAGE_TYPE_BLUDGEONING), oTarget);

SetLocalInt(oTarget, GetTag(oTarget), TRUE);
}
oTarget = GetNextFactionMember(oPC, FALSE);
}
}
else
{
FloatingTextStringOnCreature("That's a long way down!", oTarget);
}



}

Modifié par Morbane, 07 juin 2012 - 11:23 .


#3
Morbane

Morbane
  • Members
  • 1 883 messages
Any suggestions are welcome - I've tried a few things and the faction member takes damage from ApplyAffectToObject but does not JumpToLocation

Thanks...

#4
Morbane

Morbane
  • Members
  • 1 883 messages
ok - I put a DelayCommand on the ApplyEffectToObject and it works now.