99Instances2Go's Forum Posts

  • Share you project, and i will add to it.

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

    Read the manual when its jabbering about the Joints on the page for Physics.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Set gravity to 'zero', be aware that if you do that for 1 object, you do it for all. There is no concept as a 'personal' gravity in c2.

    That is why you have to do this with an action, so you can not set gravity to zero by accident. The action is under (any) object with physics attached, under Physics > global settings > Set world gravity.

    Now, just 'Apply force towards position' with x = object.X + 200 and Y = object.Y

    Or. 'Apply force at angle' with angle = zero or 180

    Be aware that a force is applied 'every tick' and an impulse is applied 'only once'.

    Now you have a horizontal floating object.

    If you need gravity. Then you have to counter the force of gravity. Gravity is applied 'every moment', under a 90 degrees angle. If keeping the defaults it is 10 m/s^2. That is just close to Earths gravity 9.80665 m/s^2.

    Just as in the real world, to fly we need to apply a force, and in the opposite direction of gravity.

    Just as in the real world, objects fall at the same speed, no matter its mass.

    But, when we apply a force, the effect of that force depends on the mass of the object. How more mass the object as, how more force we need to move it the same distance.

    In the real world, the force that we need to apply is just its weight. Weight = Mass * Gravity.

    To do that in C2 we meet 2 problems. Its mass calculation has a conversion problem build in. And physics divides time in pieces of length 1/60 (in its default state), not in length dt (1 tick).

    So lets make this story shorter, save you the math, and kill time and conversion problems.

    'Apply force at angle' with ....

    angle = 270

    Force = (Sprite.Physics.Mass ) * (1/60) * (gravity + (gravity/5))

    gravity = the number that you used with the action 'Set world gravity'

  • What is the difference between 'your visible screen' and 'the entire game screen' in context to a non HUD layer with (as you stated) Parallax property's on zero ?

  • The middle of the HUD = OriginalWindowWidth/2 , OriginalWindowHeight/2

  • Things 'slide' when on a 'ground'. Ground = an immovable object.

  • Oh an let me explain what happens.

    Take two sheets of paper. Match them neatly. Slam a small hole trough both. Now slide (parallax) the sheets of paper. The holes will no longer overlap. However, the holes on each sheet of paper are not shifted.

  • You probably have enemies, their health bars .. and the platforms on layers with different parallax property's.

    Enemies and their health bars on layers with different parallax property's can be done (calculated) with ...

    CanvasToLayerX(layer, x, y)

    CanvasToLayerY(layer, x, y)

    Calculate the layout co-ordinates underneath a position in canvas co-ordinates for a given layer.

    LayerToCanvasX(layer, x, y)

    LayerToCanvasY(layer, x, y)

    Calculate the canvas co-ordinates above a position in layout co-ordinates for a given layer.

    Solid platforms and the characters, with a platform behaviour, that are supposed to interact with those platforms can not ever be on layers with different parallax.

    We do not ask you to share your game, we ask you to share the problem. A problem can usually be isolated in a simplified project. Like this:

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

    Besides the act of sharing, you learn a LOT by isolating the problem in a simple .capx. More then you expect at this point.

  • Yes, because you apply the force to the centre of mass.

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

  • Try a cell size = tilemap celll size / 2 & cellborder tilemap celll size / 3 to 4.

    The nodes are on the grid, an accurate grid = more accurate paths.

    Other plugins, specific for tilemaps :

    But you will have to combine those with a method to move from node to node.

  • Use Bullet behaviour and set Gravity in its property's to your liking.

  • Bring all clickable objects into 1 family.

    Mouse > On object clicked ...... object = family

    Family > Pick top/bottom .. choose top

    ____________________ object is now picked and actions work on that object if you address them to 'family'

  • Dude, read your PM's from dayssssssssss ago. Example in there.