How do i change animation frame if touch or collide by another?

  • ok, sorry this is simple but I'm still confused about it so help me out, please. I'm still learning

    1. I'm trying to make the floor(sprite) change its color if landed by the sprite. but nothing works.

    I'm trying using collision but I didn't work because there is no invert on it. overlapping is also didn't work although there is invert func on it. the last method that I tried is using the instance variable.

    the event sheet was like this:

    if "floor" instance variable equal to 0 = set floor animation frame to 0

    if "floor" instance variable equal to 1 = set floor animation frame to 1

    player is overlapping sprite10 = set "floor" instance variable to 1

    player is X overlapping sprite10 = set "floor" instance variable to 0

    anyone can help me?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Try Overlapping at Offset:

    Player is overlapping floor at offset Y=10
    	Set floor animation frame to 0
    
    Player is Not overlapping floor at offset Y=10
    	Set floor animation frame to 1
    
  • Try Overlapping at Offset:

    > Player is overlapping floor at offset Y=10
    	Set floor animation frame to 0
    
    Player is Not overlapping floor at offset Y=10
    	Set floor animation frame to 1
    

    yeah that solved the problem. thank you very much

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)