Jump to content

[SOLVED] How to detect the death of an unspecific creature in the active area?


argent77

Recommended Posts

I've got another minor (semi-related) issue remaining that I'd like to fix. To have a creature enter the new map I'm initiating a dialog where the trigger object talks to him/herself:

ActionOverride(LastTrigger, StartDialogOverride("a7!td1", LastTrigger))

The speaker of the dialog text is displayed correctly. But for some reason the replies are printed in the log window as if spoken by a random creature. For example, an iron golem is called "Shambling Mound" and Aerie is called "Nymph" (see screenshot).
post-3876-0-53037800-1502390548_thumb.jpg
All of the mentioned creatures were part of the map at one time or another where the dialog takes place. Any idea how to fix it?

The complete trigger script and relevant dialog portion:

 

IF
  Clicked([ANYONE])
  Range(LastTrigger, 5)
  !Race(LastTrigger, GOLEM)
  !General(LastTrigger, UNDEAD)
THEN
  RESPONSE #100
    SetGlobal("A7!Q1EnterMaze", "MYAREA", 3)
    ActionOverride(LastTrigger, StartDialogOverride("a7!td1", LastTrigger))
END
IF ~Global("A7!Q1EnterMaze", "MYAREA", 3)~ 11
  SAY @47005 /* (Living beings can't hope to survive down there. You are well advised to stay clear of the maze.) */
  ++ @47006 /* (Don't enter the maze.) */ DO ~SetGlobal("A7!Q1EnterMaze", "MYAREA", 0)~ EXIT
END

 

 

Link to comment

The died trigger is never sent to the area. It is sent to creatures in range (not even all creatures, just those who actually 'see', the dying creature).

 

About the second question

 

ActionOverride(LastTrigger, StartDialogOverride("a7!td1", LastTrigger)) - are you sure you wanted the LastTrigger to talk to its LastTrigger and not itself (Myself).

 

When you are doing an actionoverride, the objects of the overriding action are relative to the targeted object.

It should be:

 

ActionOverride(LastTrigger, StartDialogOverride("a7!td1", Myself))

 

if you want Lasttrigger to talk to itself.

Link to comment
ActionOverride(LastTrigger, StartDialogOverride("a7!td1", LastTrigger)) - are you sure you wanted the LastTrigger to talk to its LastTrigger and not itself (Myself).

 

When you are doing an actionoverride, the objects of the overriding action are relative to the targeted object.

It should be:

 

ActionOverride(LastTrigger, StartDialogOverride("a7!td1", Myself))

 

if you want Lasttrigger to talk to itself.

 

It worked! I knew I missed something.

 

Thanks!

 

Link to comment

Archived

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

×
×
  • Create New...