LittleStain's Forum Posts

  • Have you looked in the tutorial section and searched the forum before asking this question?

    You can find multiple examples..

  • How about putting the body and arm in a container?

    You could also reference the right body by instance variable or UID, but in this case using containers should work perfectly..

    By the way, 100MB for an arm?

  • one way would be having a global variable TotalWater

    trigger once (or another triggered event)

    System set TotalWater = 0

    -- for each lake

    System TotalWater add lake.water

  • If it were more sprites you could get the angle of them checking overlap at offset..

    I'd recommend either building the bridge out of seperate objects or use invisible objects to get the angle and just using the bridge as a picture..

    Another option would just be to code the angle based on the position..

  • What you are describing can be very easily achieved using blendmodes, an example of the possibilities is shipped with Construct2

  • I don't think you can directly, but nothing is stopping you from spawning a ballobject set to circle collision looking like the player when he is a ball, replacing it again when changing shape..

  • set angle : angle(x1,y1,x2,y2) where x1 is the x-position of point 1, etcetera..

    for the distance you can use distance(x1,y1,x2,y2)

  • Your second action is setting x instead of y..

    Also if you want to point the arrow at the point, you might want to put it's origin in the bottom left corner..

  • Easiest way it would seem would be to create a tiled-background consisting of a dark part and an empty part and set it's angle from point 1 to point 2 and it's width to the distance between them..

  • With bowed solid you mean 1 sprite, or is the bridge made of several sprites at angles?

  • LittleStain

    Just for your information (<--is this a valid sentence? Not a native speaker :/), firefox throws some script error, while chrome and NW.js works OK.

    BTW you guys stop doing awesome things and make the rest of us look like idiots

    Seems like Firefox has issues with webgl in this project..

    When turning webgl off it works in Firefox too..

    This might have to do with the canvas plugin..

  • Thanks newt

    Using the array-option was obviously the best way..

    Obviously the loop does give a pause, but I kinda like being able to do this:

    Canvas-Posterize

    Now let's see if I can use it for the backgrounds in my semi-retro-adventure-game-idea...

    If not, who cares..

    Loading The tilemap from Json

  • I'm having some issues to find the easiest way to loop through a grid, setting the tiles in a tilemap based on the rgb-values of a sprite pasted onto the canvas..

    At this time I use 32 values of gray.

    I use : (canvas.redAt(x,y)+canvas.greenAt(x,y)+canvas.blueAt(x,y))/3 to get the gray value between 0 and 255 and based on that set the tile at that position to one of the 32 tiles (going from black to white)..

    Although I think I am close to getting it to work the way I want to, I thought I might try here to get some input and pointers on ways to do it easier and/or quicker..

    There might be some very fun ways to use this, or just the tilemap exported as json, I actually don't know..

    Maybe it's just one of my crazy ideas..

  • Try Construct 3

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

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

    > >

    > > You could just set "set angle" to "no" in the bullet properties..

    > > And instead of using set angle, set the angle of motion of the bullet..

    > >

    >

    No. because set angle of motion ask a degree. Wich i don't have. I have a target (object .X and Y) and thats all.

    Its a big hole in C2 i think, to at least not have a kind of "lengthdir" function in it...

    People could easily code their own tween movements with events if there was just that.

    or a simple option "move toward position" with a pixel per tick.

    But , you can still use a var to store the angle toward position, then reset angle of the object to 0.

    And use this var to set angle of motion.... it works, but OMG its complicated for such a small thingy.

    Anyway LiteTween is better i find than moveTo. Hope it'll be stable :s seems pretty heavy behavior

    Set angle of movement : angle(player.x,player.y,target.x,target.y) should work..

    Also setting a state to moving and while moving move 1 px at angle..

    It's all there..

  • Ok i see for the bullet example, but it rotates the sprite.

    You cannot set angle to position without rotating the sprite... so that doesn't do it for me.

    You could just set "set angle" to "no" in the bullet properties..

    And instead of using set angle, set the angle of motion of the bullet..