The scripts in the next post handle the creatures behaviours
I cant determine what is broken or if the broken script is just written wrong for the event
(see next post)
Modifié par Morbane, 28 avril 2012 - 06:08 .
Modifié par Morbane, 28 avril 2012 - 06:08 .
This script is broken: (HB or OnDamaged?)void main()
{
object oSelf = OBJECT_SELF;
if(GetLocalInt(oSelf, "once") == TRUE)
{
ExecuteScript("nw_c2_default9", oSelf);
return;
}
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectCutsceneImmobilize(), oSelf);
SetLocalInt(oSelf, "once", TRUE);
ExecuteScript("nw_c2_default9", oSelf);
}
void main()
{
object oChant = OBJECT_SELF;
effect eCS = GetFirstEffect(oChant);
effect eHaste = EffectHaste();
if(GetCurrentHitPoints(oChant) <= GetMaxHitPoints(oChant) / 3)
{
SendMessageToPC(GetFirstPC(), "Injured");
while(GetIsEffectValid(eCS))
{
if(GetEffectType(eCS) == EFFECT_TYPE_CUTSCENEIMMOBILIZE)
{
SendMessageToPC(GetFirstPC(), "Found Effect");
RemoveEffect(oChant, eCS);
}
GetNextEffect(oChant);
}
SetImmortal(oChant, TRUE);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHaste, oChant);
AssignCommand(oChant, ActionMoveToLocation(GetLocation(GetWaypointByTag("wp_chant_flee")), TRUE));
SoundObjectStop(GetObjectByTag("chanter_s"));
DelayCommand(3.5f, DestroyObject(GetObjectByTag("chanter")));
}
}
Modifié par Morbane, 28 avril 2012 - 03:44 .
while(GetIsEffectValid(eCSI))
{
SendMessageToPC(GetFirstPC(), "Found Effect");
if(GetEffectType(eCSI) == EFFECT_TYPE_CUTSCENEIMMOBILIZE)
{
SendMessageToPC(GetFirstPC(), "Found Effect");
RemoveEffect(oChant, eCSI);
}
GetNextEffect(oChant);
}
Modifié par Morbane, 28 avril 2012 - 05:03 .
Modifié par M. Rieder, 28 avril 2012 - 05:23 .
Modifié par Morbane, 28 avril 2012 - 05:33 .
Modifié par painofdungeoneternal, 29 avril 2012 - 12:43 .