• Welcome to Freedom Reborn Archive.
 

Another EZ Script Question

Started by yell0w_lantern, October 29, 2007, 02:10:43 PM

Previous topic - Next topic

yell0w_lantern

Is there a way to duplicate the secondary objective from the first game: Don't Alert the Guards?

GogglesPizanno

I asked this same sort of question a while ago and M25 provided a nice example to get something similar.

http://freedomreborn.net/archive/index.php?topic=41317.msg587520#msg587520

I ultimately reworked my idea into something different, but the example is still good.

graver

Hrm, I'm most definitely no expert (I ask way more then I can answer and I'm having some difficulty with Objectives and how/when they consider themselves to have succeeded) but while I was waiting for FR to come back on line (or my browser to at least reload it) I did think of a possible solution for you off the top of my head.  It's no where near as elegant as M25's but kind of along the same lines.  It's a bit hacky but it should work... theoretically.  EZ Script keeps surprising me and just about everything that i think should do one thing ends up doing something else, so i might be completely off base here, but it could be something to try:

Starting Encounters: Sneaky, Gaurding


Encounter: Sneaky
Type: Custom
Actions: Allies Want To Chat, Allies Do Not Move
Allies: civilian_male named bob
Secondary Objective: "dont alert the gaurds"  for 50 prestige and 50 xp
Marker: endmarker1
Next: End

Alert Cutscene:
Hero1 says, "Bob must be in this large blank terain somewhere.  I must use MY MIGHTY EYES to spot him!"
Yellow arrow on bob
Hero1 says, "Yes, my magnificent eyes of Justice have spoted Bob on the far side of this blank forboading terain!  Now to just walk over to him... wait!"
Hero1 says, "By all that is good and decant, those ville villains have posted gaurds!  I best use the shadows and slip by undetected!"

Chat Cutscene:
Hero1 says, "Ahha! Here I am, mighty in my mastery of the secrit arts of Ninja Justice Stealth and here in my mighty arms is the fragile, defensless Bob whom I have transversed this massive blank terran in search of!"



Encounter: Gaurding
Type: Fight
Minions: thug_with_gun
Marker: gaurd
Next: Gaurds Alerted

Start Cutscene:
Hero1 says, "Drat, they've spotted me!"
bob is destroyed


Encounter: Gaurds Alerted
Type: Custom
Actions: Allies Want To Chat, Allies Do Not Move
Allies: civilian_male named bobby
marker: endmarker2
Next: End

Alert Cutscene:
Red arrow on bobby

Chat Cutscene:
Hero1 says, "Hrm, sure, I found Bob, but my Ninja Stealth of Justice skills need some work..."



This is untested but I think it might do the trick.  The ally, bob could really be just about anything and I guess you could also use an examine encounter as well... just as long as there's an object that can be destroyed to prevent the encounter from completing you'll be golden.  If the player goes by without starting the fight scene, then he would be able to click on the original bob and complete the secondary objective.  If he gets in a fight, however, a new bob would be placed in the old bobs place and new encounter would be started, one that does not have the secondary objective but both lead to the same end result.  Thus, the player can bust heads and fail to get the sneaky bonus or sneak and get the sneaky bonus and still end up at the same spot in the end.

Two encounter markers in exactly the same spot would be needed for this bit of hackery as the original encounter (Sneaky) would never terminate if the player fails to sneak.  That is also about the only way I've found to get an objective to not be completed since any time the encounter completes, the objective seems to be scored a success  :wacko:

Hope this helps you out or at least gives you some ideas :)

Edit:  Just tested out the code and had to make a couple of corrections (read glaring errors :X) that prevented 1 cut scene from playing and alerted the guards due to the inclusion of bob in their encounter when he just had no right being there.

All in all, it works just as advertised.  You could have as many guarding encounters set up between the hero and the end as you would like and any one of them would trigger a failure of the secondary objective since it's sitting nice a pretty over in it's own encounter.  Adding in m25's flee suggestion from the other thread with this and you should almost be able to duplicate the encounter from FF...

The only problem I foresee with going this rout is potentially having an unresolved encounter hanging around.  i don't know if that's bad or not, but maybe if you could find a way to reliably kill off bob to force an ending to the sneaky encounter, then you would be golden.  :D

lmalonsof

You can find the same mission EZscriptcoded here:
http://ezscript.wikispaces.com/space/showimage/garrow2.rar

You'll need also this:
http://ezscript.wikispaces.com/space/showimage/desertbase.rar

The mission consists in sneak in the base to deactivate the force field of the entrance. There are patrols everywhere. If you get too close to them, they'll fight you. You can finish the mission without fighting.