jobel's Recent Forum Activity

  • or you could make a trigger..

    Sprite isOnScreen (invert it)

    this will execute whatever actions when there isn't a sprite on the screen. although this doesn't work if you have sprites off screen and you want to count them in your condition.

  • oops I meant PlaybackTime. you can use it any where you can write system expressions..

    Try: System Compare two values

    First Value: Audio.PlaybackTime("tag")

    Second Value: 123

    tag is what you named your audio, and the 123 is number of seconds

  • cool, sounds like an interesting game...

  • set the scale to 0.25 to see it in action!

  • figured it out..

    I was starting the TB at x:940y:540... it needs to start at x:1024y:512 since I'm doing all my math with 512...

    WoW... that feels good..

    although I'd like to do away with the dummy TB. I could probably replace it with a calculation or variable as I was just using it visually to see what was going on... it looks interesting to have both TB visible..

  • the IIDs are just the objects number sequentially. 0-to how many you have..

    the UID is the unique number of the object in the entire game..

  • pick random will only pick 1 object. you can combine it with a compare using the Object event itself... no need to use the System event again.

  • make sure the event is OnClicked and not OnMouseButtonDown

  • You could try newts sugestion and just move the background by giving it the bullet behavior and setting its angle of motion to be opposite to the players angle of motion. You then would set its speed to 0.25*player.speed to get the same visual effect a paralex, except on the same layer without the need for coordinate calculations.

    I'm not sure how that would work on an unbound layout. The player also can move 360 degrees. Eventually the player will overtake the TB, then what? I would still need to reset the tile over the player, which is what I am doing now.

    I have it working except for one small glitch. right at the beginning there's a jump... it's somewhere when the calculation starts..

    Here's the latest:

    https://www.dropbox.com/s/wc25q2e3m1vph ... .capx?dl=0

  • okay I think I figured out the problem. compensating with lerp gives a number that is not divisible by 512... so I have to bring it to the nearest multiple of 512...

  • my work around is to make the tiled background 40,000x40,000 and somehow push the player back when they get near the edge -- otherwise it will look really bad if the parallax just ends...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • R0J0hound I don't understand what the canvastolayer values are.. CanvasToLayerX(layer,x,y) there is no doc on this that I can find. I printed out the values and they don't make any sense..

    I tried your other calc: player.X + (scrollx-layoutwidth/2)*layer_parallexX/100

    but that value doesn't make sense either...

    I'm ready to give up on this... what a pain!

jobel's avatar

jobel

Member since 27 Jul, 2013

Twitter
jobel has 8 followers

Connect with jobel

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x4
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies