LittleStain's Forum Posts

  • on start of layout - player set position?

  • mahdi71

    Objects have X and Y values for their position

    So if you had an object Turret and an object Target, using the expression Shinkan suggested you'd do angle(Turret.X, Target.X, Turret.Y, Target.Y) to get the angle from Turret to Target.

    You'd then compare this angle to Turret.Angle to see if it was pointing in the right direction.

    actually it should be angle(turret.x,turret.y,target.x,target.y)

  • Why wouldn't you have room?

    You only have to place your hud within the dotted line, not everything?

  • No you can't and there is no reason to do so..

    just place the stuff that is on the layer without paralax within the dotted line..

    for C2 x=0 and y=0 is on the top left, so the dotted line shows the project size when there is no camera movement and a layer without paralax has no camera movement..

  • I would go for the option of not moving the copter at all, only left and right and make the background (platforms) move down..

  • You should place your touchstick within the dotted line, for that is the original project view,

    because the hud layer has 0,0 paralax all hud objects should be within that area..

  • 0.003 is an arbitrary number..

    I chose to only scale within a certain area and just looked at the size of the sprite when it touched the top of that area and what size I'd like it to have, so the visual appearence made me decide that number I guess (It's been a while since I made this..)

    I guess you could make the scaling based on an expression, taking into account the max y-value, min y-value, max scale and min scale, but this example was more of a proof-of-concept than an actual ready-for-publishing kinda thing..

  • In your project properties, have you set

    pixel rounding to - on

    sampling to - point

    fullscreen in browser to - letterbox integer scale

    These settings should help when using pixel-art..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The flicking action could be achieved by comparing touch start and touch end coordinates and setting speed and direction of the object accordingly..

  • You could ofcourse just use a sprite with animationframes for this or you could use the approach above, using another sprite as a mask and rotating it as needed..

    the second solution would involve using blendmodes, a great example of which can be found in the new project dialog..

  • There are a lot of topics about optimizing games..

    Where does the major part of your 9MB come from?

    If it's the graphics you might want to look into optimizing them..

    This is a great blogpost to read about not wasting memory:

    https://www.scirra.com/blog/112/remembe ... our-memory

  • If touch uses mouse input "on touch" is the same as "on mouse left click" and "is touching" is the same as "mouse left button is down",

    there is no need to make seperate events or conditions for the mouse..

    For us to help with your other issues will be pretty hard without seeing the actual capx..

    I know a lot about touch-stick controllers, I actually created a working example for all behaviours, but it isn't really clear to me what your issue is..

  • Would you like an "or" or a random action?

    you can create an "or block" by right-clicking your conditions and choose make "or block" ..

    to make random actions there are many ways depending on what you want the actions to do..

    among others you could use the random() expression and the choose(expression)

  • It would be as simple as

    set text : (variable)/10&" feet"

    where (variable) is the distance travelled in pixels..