Metal_X's Recent Forum Activity

  • Are you rounding the position of your sprites?

  • Use trim(text) to remove whitespaces

  • The same happens to my game when i was using the advanced camera plugin, when i switch to Magicam the problem was fixed, so i really don't know why this happens.

    Try to make some tests with the plugin and maybe you can fix it.

  • The gray background is a problem with the camera plugin, do you use advanced camera or magicam?

  • But you used loops? With loops you can do it in 1 frame.

  • Using conditions.

    Set a variable:

    => Set var X = random(10)+1

    Compare that variable to others already seted:

    +If var X == var Y

    => Set var X = random(10)+1

    Use loops to reapeat this until the condition "+If var X == var Y" is wrong.

    Maybe there are another way to do this, but i can't think any other way right now.

  • You have to exclude the numbers already picked.

  • It will not collide perfectly because your sprite will move more than 1 pixel per frame, ex. if your sprite is 1 pixel from the object to collide and your FPS is 60 than, 120*1/60 = 2 pixels, it will move 1 pixel inside the collision object, with lower FPS is even wrost try to put it fixed aroud 15 fps and test, try it on unlimited too and you will see it work perfectly because it will move lower than 1 pixel per frame.

    The way i discribed, using loops, will always move the exact pixels before collide with the object.

    The "is moving" i mean to be your way to detect this, in your case you have to do "On keyboard: Left button is down", move to left, and so on...

  • I really can't understand what you intended to do with this:

    Sprite: [negated] Sprite: overlaps obj : offset (0,0)

    -> Sprite: Set X to Sprite.x - (120 * TimeDelta)

    + Sprite: [negated] Sprite: overlaps obj : offset (0,0)

    -> Sprite: Set X to Sprite.x + (120 * TimeDelta)

    + Sprite: [negated] Sprite: overlaps obj : offset (0,0)

    -> Sprite: Set Y to Sprite.y - (120 * TimeDelta)

    + Sprite: [negated] Sprite: overlaps obj : offset (0,0)

    -> Sprite: Set Y to Sprite.y + (120 * TimeDelta)

    In these conditions you set the Sprite object to move equally to right, left,top and down. Of course nothing will happen...

    For the collision problem you have to use "For Loop" and make like this:

    Sprite is moving

       + For 0 to ceil(120*TimeDelta)-1

          + If Sprite is moving right

            + [negated]Sprite is overlapping at offset ((ceil(120*TimeDelta)-LoopIndex),0)

              -> Sprite move (120*TimeDelta)-LoopIndex at 0 Degrees

              -> Break

          + If Sprite is moving top

            + [negated]Sprite is overlapping at offset (0,((ceil(120*TimeDelta)-LoopIndex)*-1))

              -> Sprite move (120*TimeDelta)-LoopIndex at 270 Degrees

              -> Break

          + If Sprite is moving Down

            ....

          + If Sprite is moving Left

            ....

           

    Do it to the four sides.

    To make conditions for diagonal angles is a bit more complex.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you from Brazil!

  • I think it is a bug with else condition, i fixed it using 2 conditions:

    If Terrain overlaps Shadows And Value "Nodarken" == 0 > Set filter to Gray

    (INVERTED)If Terrain overlaps Shadows > Set filter to White

Metal_X's avatar

Metal_X

Member since 12 Jan, 2010

None one is following Metal_X yet!

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies