keepee's Recent Forum Activity

  • Ashley, two questions about collision cells:

    will the top level+first condition requirement for using the cells always be true?

    also, in many cases I am filtering to one specific instance before doing a collision check (with another filtered single instance of another object).. am i right in thinking that in this case, there's no 'brute forcing' and as such, there is no advantage to trying to make them top level conditions in order to use the collision cells.

  • it is possible to create a line graph (or any curved line, really) by creating a ton of 1x1 sprites that are automatically stretched and angled correctly with a loop

    But I think it'll be be wiser if you download the 'canvas' plugin from here

    http://www.scirra.com/forum/plugin-canvas_topic46006.html

    it lets you draw stuff onto an area

  • But if the object falls a distance that's less than about two times it's height, it just sticks to the floor.

    that's odd.. is another behaviour interfering with the physics?

  • shameful bump and edited post to be shorter.

    whoops i just checked out

    http://www.box2d.org/manual.html#_Toc258082972

    and so it seems this is a box2d thing.. still seems weird though

  • did you make sure the Offset vars are global/static?

    if not, they will be returning to their initial value (probably 0) every tick

  • ah I see, i misunderstood what you were after.

    to solve the first problem would have just been a case of using 'scroll'

    set TargetX to scrollx + (Gamepad.Axis(0,2)*width*0.5)

    but that's not really relevant now I understand what you want..

    if you create some extra vars you can try this:

    add Gamepad.Axis(0,2)*sensitivity to OffsetX

    add Gamepad.Axis(0,3)*sensitivity to OffsetY

    set TargetX to OffsetX + ScrollX

    set TargetY to OffsetY + ScrollY

    you can use clamp() to limit the Offset inbetween the view edges using the ViewportLeft/Right/Top/Bottom expressions.

    if you wish to implement layout scaling or layout rotation to your game, you should create a UI layer with that does not scroll, scale or rotate, then there's no need to add on the ScrollX or ScrollY.

    If you do that though, you then need to determine what the TargetX is on the actual gameplay layer, so you may need to use the CanvasToLayer() expression

  • so are you asking to be able to change the res output of the video card.. like with non-browser games?

  • Try Construct 3

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

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

    protip: x key

  • terence

    my bad, i just checked the manual and find that gamepad.axis() returns a value between -100 and 100, not -1 and 1 like I assumed.. so of course you just need to divide it

  • the force at which two phys objects rebound is based on simply which of the two elasticity number is highest

    This seems odd, as colliding two balls with elasticity's of 1 and 1 gives the same result as colliding elasticity's of 1 and 0.1

    I think they should be multiplied together.. the advantage of this is that you can create an object with an elasticity of 0 that doesn't rebound no matter what collision.

    This would be really useful to me and anyone else who has attempted to make a decent physics platformer. Currently the only way to stop the player bouncing off the ground/objects when landing atop, is to set absolutely everything it may collide with's elasticity to zero.

    This change will require physics behaviour users to tweak their elast values, but I believe it makes more sense for it to work this way

    I'm not sure if this is even a C2 or a Box2D thing, but I figured I'd post anyway just in case.

  • So I need a way of mapping the gamepad axis to an X,Y position for the cursor.

    I'm not sure why you'd want this instead of the traditional twinstick style..

    but anyway, I dont have a gamepad to test this with, but to my knowledge gamepad.axis() returns a value inbetween -1 and 1

    so if you can correctly retrieve the width and height of the screen you can try this:

    set TargetX to (Width*0.5) + (Gamepad.Axis(0,2)*width*0.5)

    set TargetY to (Height*0.5) + (Gamepad.Axis(0,3)*height*0.5)

    In place of Width/Height You could try using WindowWidth and WindowHeight, but to my experience they can get a little messed up depending on other settings. I work around it by just creating global variables called BaseWidth and BaseHeight, I set them to the same setting as what I have for 'window size' in the project properties.

  • You can create a Boolean instance variable on your sprite, and then use the 'toggle boolean' action

    On touched sprite: Toggle Sprite.Selected

    is Sprite Selected: spin!

keepee's avatar

keepee

Member since 6 Jan, 2012

None one is following keepee yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies