<!--quoteo(post=332355:date=Jun 24 2009, 04:07 PM:name=bartolomeu o portugues)--><div class='quotetop'>QUOTE (bartolomeu o portugues @ Jun 24 2009, 04:07 PM) <a href="index.php?act=findpost&pid=332355"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->- The Tortuga atmosphere : the cursed skeleton doesn't follow the monk.<!--QuoteEnd--></div><!--QuoteEEnd-->I have fixed the code for the Jack Sparrow storyline now; still have to do the others:<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--> case "Tortuga_jack":
Pchar.quest.Tortuga_restore.win_condition.l1 = "ExitFromLocation";
Pchar.quest.Tortuga_restore.win_condition.l1.location = "Tortuga_port";
Pchar.quest.Tortuga_restore.win_condition = "Tortuga_restore";
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, GetRandomModelForTypeNation(1, "Captains", PIRATE), "goto", LAi_FindRandomLocator("goto"));
LAi_SetImmortal(sld, true);
LAi_group_MoveCharacter(sld, "bagarreur");
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, GetRandomModelForTypeNation(1, "Captains", PIRATE), "goto", LAi_FindRandomLocator("goto"));
LAi_SetImmortal(sld, true);
LAi_group_MoveCharacter(sld, "bagarreur1");
LAi_group_FightGroups("bagarreur", "bagarreur1", true);
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, GetRandomModelForTypeNation(1, "Captains", PIRATE), "goto", LAi_FindRandomLocator("goto"));
LAi_SetImmortal(sld, true);
LAi_group_MoveCharacter(sld, "bagarreur2");
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, GetRandomModelForTypeNation(1, "Captains", PIRATE), "goto", LAi_FindRandomLocator("goto"));
LAi_SetImmortal(sld, true);
LAi_group_MoveCharacter(sld, "bagarreur3");
LAi_group_FightGroups("bagarreur2", "bagarreur3", true);
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, GetRandomModelForTypeNation(1, "Captains", PIRATE), "goto", LAi_FindRandomLocator("goto"));
LAi_SetImmortal(sld, true);
LAi_group_MoveCharacter(sld, "bagarreur4");
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, GetRandomModelForTypeNation(1, "Captains", PIRATE), "goto", LAi_FindRandomLocator("goto"));
LAi_SetImmortal(sld, true);
LAi_group_MoveCharacter(sld, "bagarreur5");
LAi_group_FightGroups("bagarreur4", "bagarreur5", true);
if(rand(100) < 50)
{
string SkelLocator = LAi_FindRandomLocator("goto");
sld = LAi_CreateFantomCharacter(false, 0, true, false, 0.25, GetRandomModelForType(-1,"Monks"), "goto", SkelLocator);
LAi_SetImmortal(sld, true);
sld.id = "bagarreur6";
sld.name = "Scared";
sld.lastname = "Monk";
LAi_SetActorType(characterFromID("bagarreur6"));
LAi_ActorRunToLocation(characterFromID("bagarreur6"), "reload", "reload7_back", "none", "", "", "skeleton_leaves", 0.0);
sld = LAi_CreateFantomCharacter(false, 0, true, true, 0.25, GetRandomModelForType(-1,"Skeletons"), "goto", SkelLocator);
LAi_SetImmortal(sld, true);
sld.id = "bagarreur7";
sld.name = "Cursed";
sld.lastname = "Skeleton";
LAi_SetWarriorType(characterFromID("bagarreur7"));
LAi_warrior_SetCommander(CharacterFromID("bagarreur7"), CharacterFromID("bagarreur6"));
}
break;
case "skeleton_leaves":
LAi_SetActorType(characterFromID("bagarreur7"));
LAi_ActorGoToLocation(characterFromID("bagarreur7"), "reload", LAi_FindRandomLocator("reload"), "None", "reload", "", "", -1);
break;
case "Tortuga_restore":
PChar.quest.Tortuga_jack.win_condition.l1 = "location";
PChar.quest.Tortuga_jack.win_condition.l1.character = PChar.id;
PChar.quest.Tortuga_jack.win_condition.l1.location = "Tortuga_port";
PChar.quest.Tortuga_jack.win_condition = "Tortuga_jack";
break;<!--c2--></div><!--ec2-->
The skeleton does chase the monk again, but he doesn't start running until the monk is at a distance.
Then once the monk disappeared, the skeleton will walk elsewhere too, rather than stand aimlessly in the port.
Also, I changed the quest from a SetEnterLocationQuest to a win_condition,
because I noticed that apparently the SetEnterLocationQuest is ALSO executed upon loading a savegame there. That resulted in double characters.
So hopefully this all works better now. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid="
" border="0" alt="mybad.gif" />