Jump to content

PS:T saved places


Recommended Posts

Another long-winded post, I'm afraid, this time about PS:T's saved places. An example snippet from the game scripting is below:




If I do ReturnToSavedPlace() at random in an actor script after having done a MoveToObject([PC]) first, then the actor will move *slightly* back on its path, leading me to suspect that perhaps it's perhaps moving back to the last 'saved' position in another sense (ie, the last position that would have been saved in the CRE?). If I put a SavePlace() between the MoveToObject and the ReturnToSavedPlace then it won't do that move - but doing SavePlace elsewhere in the script (eg, in another block, or before the MoveToObject) doesn't seem to change behaviour at all. There's no meaningful difference in the creature data of save files before/after a SavePlace, either.


The existing scripting (582 scripts use ReturnToSavedPlace..) *looks* as though they perhaps intended to use this as a proper save/store location mechanism such as in IWD2. All of the RunToSavedLocation uses do it as a response to a NearLocation/LOS check which is even stranger. :)


There are only a few scripts which use NearSavedLocation with non-zero values (all of them do ReturnToSavedPlace as the sole action). Most of them have it in a block before a RandomWalk (makes some amount of sense), or just randomly as the last action after a bunch of Attack blocks.


Okay, so I guess this is probably mostly intended to stop actors from running away after an Attack? Does anyone have experience otherwise?

Link to comment


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

  • Create New...