Skip to content
This repository
Browse code

Used Olivia to clarify the forest inaccessibility and to make it clea…

…rer about obtaining a sword.

I also added a small custom animation where I saw fit.
  • Loading branch information...
commit 85c75ec86478f2d14f17f6e8904e27cabdfbd2ec 1 parent 99bf765
authored
5  dat/maps/layna_village/layna_village_bronanns_home.lua
@@ -540,6 +540,9 @@ function _CreateEvents()
540 540
     event = hoa_map.AnimateSpriteEvent("Quest2: Bronann looks at both parents", bronann, "searching", 1000);
541 541
     EventManager:RegisterEvent(event);
542 542
 
  543
+    event = hoa_map.AnimateSpriteEvent("Quest2: Bronann is frustrated", bronann, "hero_stance", 1000);
  544
+    EventManager:RegisterEvent(event);
  545
+
543 546
     dialogue = hoa_map.SpriteDialogue();
544 547
     text = hoa_system.Translate("Bronann, I'd like you not to go outside today.");
545 548
     dialogue:AddLine(text, bronanns_dad);
@@ -572,7 +575,7 @@ function _CreateEvents()
572 575
     text = hoa_system.Translate("Bronann, please.");
573 576
     dialogue:AddLine(text, bronanns_dad);
574 577
     text = hoa_system.Translate("(Grumble) ... Crap!");
575  
-    dialogue:AddLineEmote(text, bronann, "exclamation");
  578
+    dialogue:AddLineEventEmote(text, bronann, "Quest2: Bronann is frustrated", "", "exclamation");
576 579
     DialogueManager:AddDialogue(dialogue);
577 580
     event = hoa_map.DialogueEvent("Quest2: Bronann is told not to leave town - part 3", dialogue);
578 581
     event:AddEventLinkAtEnd("Quest2: Bronann runs out of the house");
70  dat/maps/layna_village/layna_village_center.lua
@@ -271,6 +271,7 @@ local orlinn = {};
271 271
 local georges = {};
272 272
 local carson = {};
273 273
 local herth = {};
  274
+local olivia = {}; -- Olivia npc, guarding the forest entrance
274 275
 
275 276
 -- special objets
276 277
 local blocking_rock = {};
@@ -432,6 +433,51 @@ function _CreateNPCs()
432 433
 	Map:AddGroundObject(georges);
433 434
 	georges:SetDirection(hoa_map.MapMode.WEST);
434 435
 	_UpdateGeorgesDialogue(georges);
  436
+
  437
+    -- Olivia, guardian of the forest access
  438
+    olivia = CreateNPCSprite(Map, "Girl1", "Olivia", 115, 34);
  439
+    olivia:SetDirection(hoa_map.MapMode.SOUTH);
  440
+	Map:AddGroundObject(olivia);
  441
+    -- Don't grant access to the forest so easily
  442
+    if (GlobalManager:DoesEventExist("story", "Quest2_forest_event_done") == false) then
  443
+        if (GlobalManager:DoesEventExist("story", "Quest2_started") == false) then
  444
+            dialogue = hoa_map.SpriteDialogue();
  445
+            text = hoa_system.Translate("Bronann! Sorry, you know you can't access the forest without permission.");
  446
+            dialogue:AddLineEmote(text, olivia, "exclamation");
  447
+            text = hoa_system.Translate("Aww... Ok.");
  448
+            dialogue:AddLineEventEmote(text, bronann, "Bronann looks at Olivia", "", "sweat drop");
  449
+            DialogueManager:AddDialogue(dialogue);
  450
+            olivia:AddDialogueReference(dialogue);
  451
+
  452
+        elseif (GlobalManager:DoesEventExist("story", "Quest2_wants_to_buy_sword_dialogue") == false) then
  453
+            dialogue = hoa_map.SpriteDialogue();
  454
+            text = hoa_system.Translate("Bronann! Sorry, you can't access the forest without permission. You don't even have a sword..");
  455
+            dialogue:AddLineEmote(text, olivia, "exclamation");
  456
+            text = hoa_system.Translate("Aww... Ok.");
  457
+            dialogue:AddLineEventEmote(text, bronann, "Bronann looks at Olivia", "", "sweat drop");
  458
+            text = hoa_system.Translate("(Hmm, I should maybe get a sword, then.)");
  459
+            dialogue:AddLineEventEmote(text, bronann, "Bronann looks south", "", "thinking dots");
  460
+            DialogueManager:AddDialogue(dialogue);
  461
+            olivia:AddDialogueReference(dialogue);
  462
+        end
  463
+    else
  464
+        dialogue = hoa_map.SpriteDialogue();
  465
+        text = hoa_system.Translate("Good luck Bronann.");
  466
+        dialogue:AddLine(text, olivia);
  467
+        DialogueManager:AddDialogue(dialogue);
  468
+        olivia:AddDialogueReference(dialogue);
  469
+    end
  470
+
  471
+    -- Special event triggered when Bronann hasn't go the right to enter the forest yet.
  472
+    event = hoa_map.DialogueEvent("Bronann can't enter the forest so easily", dialogue);
  473
+	event:SetStopCameraMovement(true);
  474
+	EventManager:RegisterEvent(event);
  475
+
  476
+    -- Needed look at events
  477
+    event = hoa_map.LookAtSpriteEvent("Bronann looks at Olivia", bronann, olivia);
  478
+    EventManager:RegisterEvent(event);
  479
+    event = hoa_map.ChangeDirectionSpriteEvent("Bronann looks south", bronann, hoa_map.MapMode.SOUTH);
  480
+    EventManager:RegisterEvent(event);
435 481
 end
436 482
 
437 483
 function _CreateObjects()
@@ -618,28 +664,6 @@ function _CreateEvents()
618 664
 	event = hoa_map.ScriptedEvent("Quest1: Georges tells whom the barley meal was for", "Quest1GeorgesTellsBronannAboutLilly", "");
619 665
 	EventManager:RegisterEvent(event);
620 666
 
621  
-	-- Can't enter the forest so easily
622  
-	dialogue = hoa_map.SpriteDialogue();
623  
-
624  
-	if (GlobalManager:DoesEventExist("story", "Quest1_done") == true) then
625  
-	    text = hoa_system.Translate("Hmm, I can't go in there without being prepared... I suppose I need to go and find Flora again.");
626  
-	    dialogue:AddLineEmote(text, bronann, "thinking dots");
627  
-	else
628  
-	    text = hoa_system.Translate("Hmm, I can't go in there, Mom asked me to get some barley meal...");
629  
-	    dialogue:AddLineEmote(text, bronann, "thinking dots");
630  
-	end
631  
-	DialogueManager:AddDialogue(dialogue);
632  
-
633  
-	event = hoa_map.DialogueEvent("Quest2: Bronann can't enter the forest without a sword", dialogue);
634  
-	event:AddEventLinkAtEnd("Map:PushState(SCENE)");
635  
-	event:AddEventLinkAtEnd("Quest2: Bronann goes back from forest");
636  
-	event:SetStopCameraMovement(true);
637  
-	EventManager:RegisterEvent(event);
638  
-
639  
-	event = hoa_map.PathMoveSpriteEvent("Quest2: Bronann goes back from forest", bronann, 114, 37, false);
640  
-	event:AddEventLinkAtEnd("Map:PopState()")
641  
-	EventManager:RegisterEvent(event);
642  
-
643 667
 	-- Quest 2: Bronann wants to go to Flora's and buy a sword to go in the forest
644 668
 	event = hoa_map.ScriptedEvent("Quest2: Bronann wants to buy a sword from Flora", "Map_SceneState", "");
645 669
 	event:AddEventLinkAtEnd("Quest2: Bronann wants to see Flora for equipment", 1000);
@@ -1034,7 +1058,7 @@ function _CheckZones()
1034 1058
 	elseif (to_layna_forest_zone:IsCameraEntering() == true) then
1035 1059
 		bronann:SetMoving(false);
1036 1060
 		if (GlobalManager:DoesEventExist("story", "Quest2_forest_event_done") == false) then
1037  
-			EventManager:StartEvent("Quest2: Bronann can't enter the forest without a sword");
  1061
+			EventManager:StartEvent("Bronann can't enter the forest so easily");
1038 1062
 		elseif (GlobalManager:DoesEventExist("story", "Quest2_kalya_equip_n_dungeons_speech_done") == false) then
1039 1063
 			EventManager:StartEvent("Quest2: Kalya's equipment and dungeons speech start");
1040 1064
 		else
12  dat/maps/layna_village/layna_village_south_entrance.lua
@@ -319,18 +319,6 @@ function _CreateNPCs()
319 319
 	local dialogue = {}
320 320
 	local event = {}
321 321
 
322  
-	npc = CreateNPCSprite(Map, "Girl1", "Olivia", 30, 8);
323  
-	Map:AddGroundObject(npc);
324  
-	event = hoa_map.RandomMoveSpriteEvent("Olivia random move", npc, 8000, 2000);
325  
-	event:AddEventLinkAtEnd("Olivia random move", 5000); -- Loop on itself
326  
-	EventManager:RegisterEvent(event);
327  
-	EventManager:StartEvent("Olivia random move");
328  
-	dialogue = hoa_map.SpriteDialogue();
329  
-	text = hoa_system.Translate("Hi Bronann!");
330  
-	dialogue:AddLine(text, npc);
331  
-	DialogueManager:AddDialogue(dialogue);
332  
-	npc:AddDialogueReference(dialogue);
333  
-
334 322
 	npc = CreateSprite(Map, "Herth", 45, 39);
335 323
 	Map:AddGroundObject(npc);
336 324
 	if (GlobalManager:DoesEventExist("story", "Quest2_forest_event_done") == true) then

0 notes on commit 85c75ec

Please sign in to comment.
Something went wrong with that request. Please try again.