R0J0hound's Forum Posts

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Vaguely. It can be figured out with the SDK. I'm not interested though.

  • You could position the boxes with events in an automated way so that you don't have to manually position them to eliminate corners to snag on.

    Add a Sprite that you use to place dots along the floor. The events would the create a box between each dot.

    You need to add a family called otherdot which contains dot. This is so we can pick two.

    The box Sprite needs to have it's origin at the top left.

    Finally the dots need to be created left to right. You could sort them by X or by some other means but that would make the events more complex.

    Paraphrased the events loop over the dots and if it's not the last dot it stretchs a new box to the next dot.

    Start of layout

    For each dot

    Compare: loopindex<dot.count-1

    Pick otherdot instance loopindex+1

    --- create box at dot.x, dot.y

    --- box: set angle towards otherdot.x, otherdot.y

    --- box: set width to distance(self.x,self.y,otherdot.x,otherdot.y)

  • Anyone interested enough that's able to follow the sdk would be able to.

  • That's not a plugin, It's a game template capx. If it doesn't use any third party plugins it will load fine in C3. You can also ask the question on the store item you're interested in. The author of that template is pretty active in answering questions.

  • None will work for c3 unless the author ports it to c3 and mentions it in the store.

  • You may just need to do something different altogether for the terrain instead of using what I did. That array contains all the heights of the terrain which are interpolated to give a smooth terrain. All my function does is do random sized hills + a downward slope to keep everything mostly downhill.

    Just dealing with arrays can be hard to visualize. Try to make another project that makes a Sprite go right and sometimes goes down to get some ideas.

    Don't use the platform behavior, it clashes with the events. If you want it to jump then do "on touch" -> set vy to -100 or something.

  • Maybe double all your objects on separate layers and use blend modes with rectangles to clip stuff to a view. To be faster you'd probably just use events and behaviors on the first originals and position the copies. There are likely lots features that wouldn't work well with that though.

  • LaurenceBedford

    No. The sdk doesn't support a plugin like this currently and I don't think I have enough time or interest to do it if it did.

  • Just click on several different instances and give them different values for their instance variables. It doesn't matter what values. Then go back to the manage variables dialog and it will say <varies>. So basically it's not something to need.

  • Hi tonypond

    For mirror and flip you can set the width and height to negative. I find that more useful as the actions you refer to do that anyway and are redundant.

    I didn't add scale as that's based on image size and I thought it made things unintuitive because you can change the texture size with the set resolution action. It can be done with the set size action if it's really needed.

    So I think I purposely didn't add those two features.

    Any pasted objects should draw exactly as they are overlapping the paster object. So that last bit should be true. I don't think you can load an image into the paster object but you can load it into a Sprite and paste it.

    I'm glad you find it useful but I'm avoiding updating it unless I absolutely have to.