Jump to content

Persistent MoveToObjectFollow()


argent77

Recommended Posts

I wanted to use the action MoveToObjectFollow() to guide a creature to a specific person in the same area. It works well for my purposes, but there is one big problem. Whatever I try, the creature won't stop following me after I have delivered it. IESDP states that a different action will cancel the behaviour, but I haven't found one so far. Neither NoAction() nor ClearActions() are working.

 

Is there even a way without killing the creature in the process?

Link to comment

For testing reasons I have removed every script except for this dialog portion:

IF ~Global("A7Q5Delivered", "MYAREA", 0)~ fes.talk.1
 SAY ~What are your orders, master?~
 ++ ~Wait here!~ + fes.stay
 ++ ~Follow me!~ + fes.follow
END

IF ~~ fes.stay
 SAY ~I will wait here.~
 IF ~~ DO ~ClearActions(Myself)~ EXIT
END

IF ~~ fes.follow
 SAY ~I will follow you.~
 IF ~~ DO ~MoveToObjectFollow(LastTalkedToBy)~ EXIT
END

Still, the creature won't stop following me, ever.

 

You can use MoveToObject(), particularly if you do not want to follow it afterwards.

Yes, that would be an alternative. I have avoided it because it's more complicated to code and the creature will likely crash into my character everytime he stops for a moment.

Link to comment

not too sure of what i'm saying... :p

 

but try wrapping inside an ActionOverride() and specify the actor. even tho the actor is running the dialog sometimes they don't take the actions without being in an ActionOverride()

 

Else instead of ClearActions() try telling it to MoveToObject() so that maybe it will stop following

Link to comment

No, neither ActionOverride nor any of the MoveTo actions work. It looks like the creature is ignoring any scripting action after issuing MoveToObjectFollow().

 

I'm also unable to save the game after the creature starts following me.

Link to comment

try seeing if you can break the action from script rather than dialog. set a variable in the dialog and then if that's set give the actor a different action.

 

its at least worth a try.

 

BG2 scripting isn't really my thing. Might be easier to accomplish stuff but it's more complicated in other respects ^^

 

hope you can get what you want working

Link to comment

The Haiass mod uses MoveToObjectFollow and presumably other actions work with it (you can tell the wolf to wait, run away, etc. after that). I wouldn't do it with area variables in dialogue though. Just set some GLOBAL in the dialogue and have the creature's script respond to it (I believe that's how Haiass does it).

Link to comment

Archived

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

×
×
  • Create New...