Jump to content


Photo

EscapeAreaDestroy() not working properly


  • Please log in to reply
4 replies to this topic

#1 Vlan

Vlan
  • Member
  • 194 posts

Posted 16 March 2015 - 04:49 PM

Does not matter if it's (90) or (5) or just EscapeArea(). The NPC's immediately disappear.

 

Some NPC's however do wander away although they literally have the same Action as the one I just modified (Alec from Romantic Encounter in Candle Keep walks away, Aoln the Ranger in the Coast Way immediately disappears [both have EscapeArea()]).


There are also no other EscapeAreas in the NPC's scripts which might conflict with the EscapeAreaDestroy() action in the modified dialogue of the NPC.

 

Also, the area where the npc's located has exit points.


Edited by Vlan, 16 March 2015 - 05:11 PM.


#2 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 16 March 2015 - 05:15 PM

The delay is for the "not blocked" -removal of the creature, not the delay on how long it takes for it to start moving ... and by the way, the original game has no script that has anything else than closed brackets there, so it doesn't actually have a live example of the timer. And it could have been left out even.

Edited by The Imp, 16 March 2015 - 05:16 PM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#3 Vlan

Vlan
  • Member
  • 194 posts

Posted 16 March 2015 - 05:18 PM

EscapeArea() isn't working either. Modified NPC is not "blocked(?)" but immediately disappears.

 

edit: Is there any definition for blocked in Infinity Engine scripting?

 

The BG2: ToB Script Action site says:

This action, in its first form, instructs the active creature to leave the current area, either by walking, or, if the path is blocked, by simply disappearing.

 

Seems like that this blocked thingy might be the cultprit. But the NPC's surely do not look like as if they are blocked.


Edited by Vlan, 16 March 2015 - 05:26 PM.


#4 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 22 March 2015 - 10:31 AM

EscapeArea() and its variants are quirky, as they are tied up in some complex pathfinding code. You're better off using MoveToPoint() or MoveToObject() and then either DestroySelf() or EscapeArea() from there. Possibly suboptimal, since you may not always know where you want the actor to move to, but that's the thing: EscapeArea() doesn't always know either.


Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#5 Vlan

Vlan
  • Member
  • 194 posts

Posted 22 March 2015 - 10:34 AM

MoveToPoint() was my solution at the end as well.
Thanks for the answers.