BillyShears's Recent Forum Activity

  • -Player is a square

    -I have platform behavior and a solid object floor.

    -Spacebar simulates jump

    -When player not on floor I rotate

    When I press spacebar the square jumps and rotates how I want but when it lands back on the floor or onto another square it doesn't flatten out. What am I missing here? Thanks for any advice!

  • I tried a few things that worked nicely. Thank You!

    Ultimately since my game doesn't scroll constantly I had to go back to my method. I fixed it by doing some math. I had to take into account that I only shift the tiled bg X after the move is over. So I had to expand the tileBg size to double the screen plus the character's move distance and make sure it is was an even multiple of the sprite size (to keep from jerky effect) . Sounds crazy but it works now some I'm going with it ;)

  • I have a tiled background that is similar to that of an endless runner but doesn't move all the time. I only move it on a certain condition.

    First issue: Since the background does not move all of the time AND I need it to get to the new X in a set amount of time, I am currently using tween to change the tiled background X to self.x - movedistance when a condition is met. This seems to work fine, just wanted to check if I should do this a better way.

    Main issue: I am looking for a known formula to shift the X value of my tiled background to make it seamless and endless. I'm currently using tileBG.X + tileBG.Width/2. This works for some of the tiled backgrounds but one of them will have a gap before it shifts and fills back in.

    For example,

    -the screen width is 1080

    -I have an 80 pixel sprite tiled to 2160 width, this one works

    -Another 128 pixel sprite tiled to 2176

    -The background movedistance is -400 (NOTE: I all worked fine when the movedistance was -80)

    -I currently wait until the tween is done to check if a shift is needed, this causes the gap

    -If I do it immediately there is no gap but my tween is still playing and sometimes its noticeable when it shifts X.

    So, my main goal is to move the tiledbackground endless and seamless (no gaps) only when a condition is met and it must arrive at new x in set amount of seconds.

    Thanks for any suggestions!

  • Thanks, will try this out shortly.

    For the movement, should I use bullet behavior?

  • BillyShears

    I managed to compensate for the x/y drift, so z-elevation will scale from the object's origin regardless of position in the viewport - updated in the demo linked above.

    Thanks, I will be trying this as well.

  • First off, I do already have this working, but starting to think I did it the long way. I'm currently tracking the start and end coordinates of a swipe, compare it to the coordinates of my grid rows and determine what direction the swipe is.

    After some looking around at behaviors, I noticed tile movement and was wondering if I should have been using that all along or if there is even another easier way to do this.

    In my project, I have a four by four tile grid and when I touch a tile piece, and swipe (up, down, left, right only, not 8 direction) I want the touched tile to move onto the next tile in that direction.

    What is the cleanest, least amount of conditions, easiest way to do this?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the recommendations, I was able to get this working.

  • More specifically, I want the score to pop out quickly when it changes then back to normal size. I’ve tried tween size but found it just changes the text object’s size and not the font, which makes sense. Thanks for any suggestions.

  • Well.. you can set the variable isfinished = true in the main event..

    because doesn't matter if the value is odd or even, you will always set true to the boolean..

    So, if the main event is true, it always will be isfinished = true.. does it matter if sets before or after?

    Even if you have another event comparing if isfinished = true, as I undestand, it will always finish the main event and subevents before trigger other main event.

    Edit: or you can just have a last blank sub event, parent of the main event with action set isfinished = true.. it will always run but last

    Thank you, I will try both of these.

  • Thank you, I will set my example up this way.

  • Does an action in event run after sub event? If not, how do I run action after sub event?

    For example:

    1) Event - checks if value is greater than 0

    2) If value is greater than 0, do sub event

    3) Sub Event - checks if value is odd, if odd do something

    4) Sub Event - Else value is even, if even do something

    5) After SubEvent set boolean isFinished = true

    I'm wondering if I have to set isFinished at the end of each path or if there is an easier place to set it just once when everything is complete.

    Thanks!

  • Unless you are performing this on every tick, with your array size I don't think there will be any difference in performance even if you do 1000 passes.

    If you need to scan every row and every cell for a certain value and repeat this until this value is no longer there, here is how you can do it:

    Thank you very much, it took me about 1 minute to get it working. I added the extra condition to the while loop i already had and that did the trick. (I even added the loopindex safety check).

BillyShears's avatar

BillyShears

Member since 30 May, 2019

None one is following BillyShears yet!

Trophy Case

  • 5-Year Club
  • Email Verified

Progress

6/44
How to earn trophies