Ice with Water underneath - How to handle trigger?

NordNord Posts: 3Member
edited June 21 in 2D

Hello everyone!
For the past two weeks I've been learning this neat engine and I have a question on how to solve this certain scenario in my 2D top-down game.

During the game, the player moves around on patches of ice that start to break as the player goes over them.
Currently, underneath said patches of ice, I have a layer of water that is supposed to sense when the player touches it, but, at the moment it triggers as soon as I start the game, even though the player is on a patch of ice "above" it.

What is the correct approach on how to solve this?
I've tried a variety of things, even simple things such as Z-Index to no avail.

Thanks for any help!

Comments

  • TwistedTwiglegTwistedTwigleg Posts: 2,655Admin

    Welcome to the forums @Nord!

    How does the water sense the player? If it is sensing the player automatically at start, then it might be something with the code related to the water sensing the player that may need adjusting.

  • MegalomaniakMegalomaniak Posts: 2,645Admin

    have logic be on the ice instead and give the ice a durability variable. Each time the player exits the ice tile area you subtract from the durability value until it is 0. Then if it is 0 you have the logic for water run instead.

  • NordNord Posts: 3Member

    @Megalomaniak said:
    have logic be on the ice instead and give the ice a durability variable. Each time the player exits the ice tile area you subtract from the durability value until it is 0. Then if it is 0 you have the logic for water run instead.

    Believe it or not, this is the exact thing I came up with 10 minutes after heading to bed.
    Thanks for the help nonetheless! :smile:

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file