Moving Left But not Right

This forum is currently in read-only mode.
From the Asset Store
A complete set of graphical user interface (GUI) to build 2D video games. With wood, nature, & jungle theme
  • I am currently creating a puzzle game where you can move left through some blocks but not right. Currently I have a system where if you press the right key the block becomes solid and when you press the left key the block becomes un-solid. The problem is that if you are overlapping the block and press the right key you teleport.

    http://dl.dropbox.com/u/2867484/OneWay.cap

  • I am currently creating a puzzle game where you can move left through some blocks but not right. Currently I have a system where if you press the right key the block becomes solid and when you press the left key the block becomes un-solid. The problem is that if you are overlapping the block and press the right key you teleport.

    http://dl.dropbox.com/u/2867484/OneWay.cap

    this woorks for me:

    + DirectionBlock: Value 'Direction' Equal to 0

    ????+ MouseKeyboard: Key Right arrow is down

    ????+ playerCol: overlaps DirectionBlock : offset (10,0)

    ????????-> DirectionBlock: Set collision mode to None

    ????+ MouseKeyboard: On key Left arrow pressed

    ????????-> playerCol: Deactivate Platform movement

    ????+ MouseKeyboard: [negated] Key Left arrow is down

    ????+ System: Trigger once

    ????????-> playerCol: Activate Platform movement

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > I am currently creating a puzzle game where you can move left through some blocks but not right. Currently I have a system where if you press the right key the block becomes solid and when you press the left key the block becomes un-solid. The problem is that if you are overlapping the block and press the right key you teleport.

    > http://dl.dropbox.com/u/2867484/OneWay.cap

    >

    this woorks for me:

    + DirectionBlock: Value 'Direction' Equal to 0

    ????+ MouseKeyboard: Key Right arrow is down

    ????+ playerCol: overlaps DirectionBlock : offset (10,0)

    ????????-> DirectionBlock: Set collision mode to None

    ????+ MouseKeyboard: On key Left arrow pressed

    ????????-> playerCol: Deactivate Platform movement

    ????+ MouseKeyboard: [negated] Key Left arrow is down

    ????+ System: Trigger once

    ????????-> playerCol: Activate Platform movement

    But then you can't jump on the blocks like you need to be able to.

  • Try this it will eliminate the teleport.

    + DirectionBlock: Value 'Direction' Equal to 0
    
       + MouseKeyboard: On key Right arrow pressed
       + playerCol: overlaps DirectionBlock : offset (10,0)
       |  -> DirectionBlock: Set collision mode to None
       |
       + MouseKeyboard: On key Left arrow pressed
       |  -> DirectionBlock: Set collision mode to Per Pixel
       |
       |  + playerCol: playerCol overlaps DirectionBlock
          |  -> DirectionBlock: Set collision mode to None
    [/code:1kvgwug0]
  • Thanks for the help, I can't even drag and drop code properly.

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