Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] LiquidArea Problem
theyhunger Offline
Junior Member

Posts: 15
Threads: 6
Joined: Jul 2017
Reputation: 0
#9
RE: LiquidArea Problem

(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 Tongue. 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. Smile

https://imgur.com/a/xlSvL6R
(This post was last modified: 06-29-2018, 08:56 AM by theyhunger.)
06-28-2018, 08:35 PM
Find


Messages In This Thread
[SOLVED] LiquidArea Problem - by theyhunger - 06-23-2018, 05:12 PM
RE: LiquidArea Problem - by Mudbill - 06-23-2018, 11:12 PM
RE: LiquidArea Problem - by theyhunger - 06-24-2018, 11:13 AM
RE: LiquidArea Problem - by Mudbill - 06-25-2018, 03:46 PM
RE: LiquidArea Problem - by theyhunger - 06-25-2018, 08:17 PM
RE: LiquidArea Problem - by Mudbill - 06-27-2018, 03:35 AM
RE: LiquidArea Problem - by theyhunger - 06-27-2018, 08:48 AM
RE: LiquidArea Problem - by Mudbill - 06-27-2018, 03:42 PM
RE: LiquidArea Problem - by theyhunger - 06-28-2018, 08:35 PM



Users browsing this thread: 1 Guest(s)