Jump to content

Problem with Creatures Controlling Other Creatures from Script


Thimblerig

Recommended Posts

I am working on an encounter where several creatures will talk to each other via DisplayStringHead. To keep the coding simple all the controls are in the first creatures script and, theoretically, it uses ActionOverride on the others to make them talk. Only problem is, it doesn't - I just get the first creature's side of the conversation.

This is the creature script:

IF
!GlobalTimerNotExpired("T1CMBirdCallTimer","GLOBAL") // script will repeat at gracious intervals
Detect(PLAYER1)
Global("T1CowMoo","GLOBAL",1)
THEN
RESPONSE #30
RealSetGlobalTimer("T1CMBirdCallTimer","GLOBAL",15)
PlaySound("%tutu_var%AMB_E05E")
DisplayStringHead(Myself,~Rise up, my love, my fair one, and come away!~) // this works
CreateVisualEffectObject("SPCLOUD3",Myself) // this line is for debug, and works
Wait(2)
PlaySound("%tutu_var%AMB_E05F")
ActionOverride("T1CMBir2",DisplayStringHead(Myself,~The voice of my beloved! behold, he cometh!~)) // this doesn't work
CreateVisualEffectObject("SPCLOUD3","T1CMBir2") // neither does this line of debug
// more like this
END

 



DisplayStringHead("T1CMBir2",~Rise up, my love, my fair one, and come away!~)

 


won't work either. It's like the game can't recognise the other creatures.

The creatures are spawning just fine. They get declared in the tp2 like so:

COPY_EXISTING ~%tutu_var%BIRD.cre~ ~override/T1CMBir1.cre~
WRITE_ASCII 0x248 ~T1CMBir1~ #8 // override
WRITE_ASCII 0x2cc ~T1CMBir1~ #8 // dialogue
WRITE_ASCII 0x250 ~~ #8 // class script
WRITE_ASCII 0x258 ~~ #8 // race script
WRITE_ASCII 0x260 ~~ #8 // general script
WRITE_ASCII 0x268 ~~ #8 // default script
SAY NAME1 ~Bird~
SAY NAME2 ~Bird~

COPY_EXISTING ~%tutu_var%BIRD.cre~ ~override/T1CMBir2.cre~
WRITE_ASCII 0x248 ~T1CMBir2~ #8 // override
WRITE_ASCII 0x2cc ~T1CMBir2~ #8 // dialogue
WRITE_ASCII 0x250 ~~ #8 // class script
WRITE_ASCII 0x258 ~~ #8 // race script
WRITE_ASCII 0x260 ~~ #8 // general script
WRITE_ASCII 0x268 ~~ #8 // default script
WRITE_BYTE 0x237 2 // bird is a girl bird
SAY NAME1 ~Bird~
SAY NAME2 ~Bird~

 


Can anyone help spot whatever incredibly obvious thing I'm missing?

Link to comment

*Squint* - Huh, I did leave the death variable out. (I feel really stupid, now.)

 

Thank you! A thousand blessings upon you!

 

EDIT:

 

Yup, that fixed it. For added hilarity, when I keep my party in one place to test out the encounter, Xzar keeps complaining about the excessive noise. :)

Link to comment

Archived

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

×
×
  • Create New...