I'm having a quest-wide problem where f->Vx and f->Vy stop functioning. This happens after my scripts grab ffc's that were formerly used by ghosted enemies. The enemies die, are cleared, then I use something like RunFFCScript() to grab one of the newly-freed ffc's and run a script. Velocity simply won't function for those ffc's anymore. Here's the steps I've taken to troubleshoot:
- Wrote a custom function to clear all Misc and InitD variables before grabbing the ffc
- Verified my ghost.zh setup
- Searched my global script for anything that could be setting ffc positions or velocity on a frame-by-frame basis
- Traced velocity values at multiple different points to ensure they were getting set properly and not cleared by anything
- Manually set x and y values to make sure they weren't getting set to the same position every frame
- Traced the x and y values at various points to ensure they were set correctly
- Traced something to ensure the stationary flag wasn't getting set
The pattern is obvious. I can grab any ffc never used by ghost, and velocity works fine. But if a ghosted enemy dies and I try to use its ffc for something else, velocity stops working, in spite of the fact I can't see any information on the ffc that differs from a "fresh" one. I can't rely on any given ffc I grab for use having functioning velocity anywhere in the quest.
Any idea what's going on here?
Edit: After a bit more investigation, I've found what's happening, but not why it's happening. The ffc I'm grabbing is getting linked to ffc 1. That is to say, f->Link = 1, which is usually motionless. But why the heck would killing a ghosted enemy result in this happening?