(06-27-2018, 03:42 PM)Mudbill Wrote: Ok, I set up a minimap level to reproduce the issue and I found out what's going on.
There seems to be an event triggered when you first ENTER a liquid area which enables the splashing, then another when you LEAVE which disables it.
If you teleport the area away from the player after they have entered it, the LEAVE callback isn't triggered. This means that anywhere you walk will cause splash effects until you enter the area's new location and then leave it again. That's when the LEAVE callback is finally triggered and all the positions seem to be up to date afterwards.
This means you'll have to find a way to work around this issue.
Edit: Setting it inactive has the same effect except it won't trigger the ENTER callback anymore, so you can't reset the state using the inactive area.
Edit 2: Maybe you can avoid the issue by not disabling or teleporting the area until you know the player has already left it. So let the player cause the LEAVE callback, then change the areas. Perhaps using a collide callback script area that hovers in the middle of the ladder across the entire room (make it very thin, but not 0).
Thank you for the information but I have managed to fix this frustrating issue / bug. All I did was made a way to get out of the water before using the ladder as using the ladder doesn't seem to use the LEAVE function of the water as you stated. My new problem was that the ladder was still accessible from the water so I had to place a custom-made invisible box to block the ladder being used and I reworked the ToggleWater script to ToggleInvisBox, so now instead of disabling the water, it now disables that block box so the ladder can be used, but when you enter the water again, it will re-activate the block box.
Here's what I mean:
https://imgur.com/a/D6WEskE
/*Toggle Invisible Box - Ladder
*/
void CollideToggleInvisBox(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("invisible_box_1", false);
}
void CollideToggleInvisBox_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("invisible_box_1", true);
}
Again, thank you for all the help. You are a hero! =D
EDIT: I guess I didn't like my idea with the stairs and the block box so I removed it
. However, as I fell asleep that night, I had an idea... and it works great (for the most part). All I did was place another small liquid area above the ladder so when you get off the ladder, it WILL trigger the LEAVE function of the water. Once again, thanks for the help you've provided.
https://imgur.com/a/xlSvL6R