ViewportLeft X axis

0 favourites
  • 2 posts
From the Asset Store
Suki Sprite Sheet
$1.25 USD
50% off
The Suki Sprite Sheet features a fierce green goblin warrior wielding dual axes.
  • I fixed the capx to less then 26 events this time. Everything you need to check is in player event sheet. 8)

    Problem Description

    i think the viewportleft positive and negatives are in reverse, or player.width is returning a negative value. ViewportLeft("layer")-obj_player.width seems to check on the right side of the player, but should be the left side. If i change to ViewportLeft("layer")+objplayer.width it checks the left side, but it should be right side right?

    Attach a Capx

    https://dl.dropboxusercontent.com/u/396 ... ftbug.capx

    Description of Capx

    Moves player onscreen with WASD keys, and has a zelda style viewport pan when you get to the edge of the screen.

    Steps to Reproduce Bug

    move the player off the right edge of screen. wait until it finishes scrolling.

    move the player off the left edge of screen.

    Observed Result

    Viewport left scrolls before the player is outside view.

    Expected Result

    Viewport left scroll will only trigger once the player is outside the view. Like the right side

    Affected Browsers

    Chrome: YES

    FireFox: YES

    Internet Explorer: YES

    Operating System and Service Pack

    Windows 7 64 bit

    Construct 2 Version ID

    version 166

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This just looks like a mistake in your events. Note object sizes are allowed to be negative if the object has been mirrored/flipped, and the viewport edges are allowed to be negative if they are outside the layout bounds. If you think either the viewport or object size expressions are returning the wrong value, it should be very easy to prove: just make an empty project displaying the values and describe what the value is vs. what you expect. If you can't do that, it's probably because everything in Construct 2 is working just fine and you made a mistake yourself.

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