Jump to content

Relocate_character() wonkiness


Recommended Posts

Couldn't find any documentation on this or related posts, but relocate_character() seems to interact with the source code in strange ways.

 

If used to jump a creature around, for instance, in combat, they'll occasionally just phase to some "random" location. I was able to mitigate this issue by setting their mobility to 0 when appropriate. I have no idea why this works, I just assumed the issue was tied to how do_attack() and movement interact with the API.

 

If called outside of combat, it will freeze every member of your party outside of the first, who follows input normally. The more it's called in short succession, the more pronounced the effect:

 

AIqOhbL.png

 

It functions similarly no matter what sort of script you call it from. I have not been able to find a fix.

 

The unfortunate consequence is the lack of flexibility. There are no other calls, to my knowledge, that teleport a creature to another space. I had been building a modular creature script that teleports the creature around and on top of the party, and it broke down outside of combat due to this issue.

Link to comment
Share on other sites

This probably isn't what you want to hear, but I suspect there's just no way to make this work unfortunately. The relocate_character call is documented under cutscene calls, so presumably Jeff never thought that someone might used it to implement teleportation.

Link to comment
Share on other sites

On 10/7/2020 at 10:20 AM, Enraged Slith said:

If called outside of combat, it will freeze every member of your party outside of the first, who follows input normally. The more it's called in short succession, the more pronounced the effect:

Maybe I'm being dense, but I don't understand what this means. What are you doing, and what is the problem?

 

I use relocate_character() all the time, mostly for cutscenes but not exclusively, and I've never noticed any problems.

Link to comment
Share on other sites

13 hours ago, Kelandon said:

Maybe I'm being dense, but I don't understand what this means. What are you doing, and what is the problem?

 

I use relocate_character() all the time, mostly for cutscenes but not exclusively, and I've never noticed any problems.


Walking around town while relocate_character() is being called every turn, for example, makes it so that only the first member of your party moves anywhere. Everyone else just stands around frozen every time it’s called. It’s not an issue in cutscenes or in combat, it just makes it somewhat inflexible if you’re using it to move a creature around for another reason.

 

I tried to build a modular creature script that used it to move an invisible creature around (and change abilities while in attack range) to strike at enemies from random locations and teleport away when struck, and it breaks outside of combat for this reason. Just meant it isn’t portable and I had to work around it, but I was disappointed because it was pretty cool.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...