R0J0hound's Forum Posts

  • ome6a1717

    Put int() around all the values. Numbers with decimals will make it not work.

    ChesVCF

    There should be an action to set the canvas' resolution. That won't resize the image though. For that load the image in a sprite or something, make the sprite size 32x32 and paste it to a canvas of size 32x32.

  • Here's the example on how to draw an distorted quad with the paster object:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • jobel

    There's a dropdown to select between rect and polar. Select polar and set the angle to shooter.angle and dist to 500.

    For the bouncing adjust the friction. High friction absorbs perpendicular motion on a bounce.

  • link fixed

  • How?

    You add a tilemap object just like you add a Sprite. Then with the tilemap toolbar you can place tiles on the tilemap. Finally to make it an obsticle you add the solid behavior to it.

    That's how I work with it. If that doesn't cover what you want to do, please be more specific.

  • Fiddle with 99's other ideas then.

    The most manual way would be to add additional variables that have the original position and variable values in them. Then to reset you set set the positions and variables from that.

  • Actually it looks like you have the sprite's origin centered. It needs to be on the left.

  • You could do this. Put all the names in an array. Then loop over the array and use the find expression to see if the input can be found for each item. If any do add it to the displayed list of items.

    https://www.dropbox.com/s/ufapkdonl2aiy ... .capx?dl=1

  • If it's not created there perhaps it's moved there elsewhere in events?

    Actually thinking about it. this action here:

    [quote:2401q0et] 'Create object' on layer3 at (enemy.X, enemy.Y)

    can create at 0,0 if there are no enemy instances to get a value from.

  • You could do this:

    global number placed=0

    spriteA: on drop

    spriteB: var = 1

    spriteA: is overlapping SpriteB

    SpriteB: pick closest to (spriteA.x, spriteA.y)

    --- spriteA: set position to spriteB

    --- spriteB: set var to 0

    --- add 1 to placed

    --- spriteA: disable dragndrop

    placed = spriteA.count

    --- wait 1 second

    --- restart layout

  • This is all you do to create a smooth line. You could also create dots as well at (mouse.x, mouse.y). It will become slow over time as the number of objects gets higher. You'll probably want to draw it to a paster object or something.

    global oldx=0

    global oldy=0

    left mouse is down

    --- create line at (oldx,oldy)

    --- line: set width to distance(self.x,self.y,mouse.x,mouse.y)

    --- line: set angle toward (mouse.x,mouse.y)

    every tick:

    --- set oldx to mouse.x

    --- set old.y to mouse.y

  • Just average the positions.

    With two players:

    camera.x = (player1.x + player2.x)/2

    camera.y = (player1.y + player2.y)/2

    With three players:

    camera.x = (player1.x + player2.x + player3.x)/3

    camera.y = (player1.y + player2.y + player3.y)/3

    With four players:

    camera.x = (player1.x + player2.x + player3.x + player4.x)/4

    camera.y = (player1.y + player2.y + player3.y + player4.y)/4

    ...and so one. hopefully you see the pattern

  • Moving stuff by smaller amounts is one way that kind of works. The correct way to solve it is to only move objects with forces or setting velocity. That way the physics behavior can work best. Any time you set a position or angle it is like the object teleport and the physics behavior cannot account for it. As a note, the pin behavior which is likely used here is the same as setting position and angle.

  • You can not use any behaviors if you like. Create a sprite and make the image origin to the left.

    Then give the sprite a variable called "w" and create an event like this:

    every tick:

    --- sprite: add cos(self.angle)*500*dt - self.w*0.001

    --- sprite: rotate self.w*dt degrees clockwise

    "w" is the angular velocity of the object.

    500 is the gravity. Change it to adjust the speed things go.

    0.001 is the damping. Make it lower to allow the pendulum to swing longer before it stops.

  • link updated in other topic