Jump to content

Leader & Henchmen Escape Area


Wounded_Lion

Recommended Posts

Scenario: A leader and five guards leave the area if a certain dialogue option is chosen. All five guards have the script name "GUARD".

 

I tried:

 

IF ~~ THEN DO ~EscapeArea()
		   ActionOverride("GUARD",EscapeArea())~ EXIT

 

When the above is implemented in the leader's dialogue file, the leader and one guard leave the area (I expected the game engine to match all creatures with the script name "GUARD").

 

Then, I tried:

 

IF ~~ THEN DO ~EscapeArea()
		   ActionOverride("GUARD",EscapeArea())
		   ActionOverride("GUARD",EscapeArea())
		   ActionOverride("GUARD",EscapeArea())
		   ActionOverride("GUARD",EscapeArea())
		   ActionOverride("GUARD",EscapeArea())~ EXIT

 

When the above is implemented in the leader's dialogue file, the leader and one guard leave the area (I expected that repeating the action multiple times would match multiple targets).

 

So... how do I get the whole bloody lot of them to head out? I do not want to give each guard a unique script name. There has to be another way... I thought about using a specialized "Get the hell out of here!" shout... but that option seems needlessly complex. Advice? Thoughts?

 

- D

Link to comment

I have had no choice but to use individualized DVs; the short way was to do this:

 

in tp2,

COPY_EXISTING  ~_BANDIT.CRE~ ~override/X#BANDK1.CRE~
		   ~_BANDIT.CRE~ ~override/X#BANDK2.CRE~
		   ~_BANDIT.CRE~ ~override/X#BANDK3.CRE~
 SAY NAME1 @30
 SAY NAME2 @30
 WRITE_BYTE 0x270 ~128~ //Allegiance = Neutral
 WRITE_EVALUATED_ASCII 0x280 ~%DEST_RES%~ #32 // death variable
 WRITE_ASCII 0x2CC ~~ #8 // dialog

 

I tried Follow, Leader, a specialized shout; the problem seems to be that without a unique DV, only one of the copies of .cre ever responds. (CamDawg showed me quick patching "auto-create" of death variable based on .cre name - saves some serious time and troubleshooting, plus makes it easy to recheck BAFs :) ).

Link to comment
When the above is implemented in the leader's dialogue file, the leader and one guard leave the area (I expected that repeating the action multiple times would match multiple targets).

It's actually sending an EscapeArea() to the first "guard" it finds five times.

 

If you don't want to use different creature files, just add a chunk like this to their script:

 

IF
 Global("WLGuardsLeave","GLOBAL",1)
THEN
 RESPONSE #100
EscapeArea()
END

Then just set the variable instead of the ActionOverrides.

Link to comment

Nooooooooo!!! I refuse! lol. In this particular situation, declaring unique script names would require 60+ unique creature files. This is unacceptable to me.

 

However: Thank you for your advice. I do appreciate your taking the time to share your thoughts with me.

 

If no one can provide me advice that leads to a solution to this problem, I will attempt to create a system of shouts by which the effect can be accomplished (should be easy... just requires more of my precious time... hehe).

 

:)

 

- D

Link to comment
:) This is why I like posting solutions, even though I don't always have the best answer - the compare/contrast means I learn what logic step I am missing. Wicked cool and simple solution, CamDawg - wish I had thought of that this summer before rebuilding!
Link to comment
Hmm... Thanks, Cam! That sounds workable. I'm going to experiment with it now... :)

It's really the same idea as a shout. If you substituted the SetGlobal action with a Shout(pi) and replace the Global trigger with Heard(pi) it's essentially the same idea. One complication is that you would need to ensure everyone can hear the shout and that your shout numbers don't overlap with some other script--i.e. don't use Bioware's help shout number as your 'time to go' shout. :)

 

Also, don't use irrational numbers such as pi for your shout number.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...