oosyrag's Forum Posts

  • Something like https://www.dropbox.com/s/q0x1i46u72kfl ... .capx?dl=0 ?

    If you're using round and you need to get it back center exactly, your lerp factor will have to be greater than 0.5.

    Otherwise, use two sub events, one with floor and one with ceil depending on which way it is heading.

  • Are you sure your white box isn't pinned to anything? Have you tried isolating and simplifying your project to a point where it does work as expected?

  • clamp(x, lower, upper)

    Return lower if x is less than lower, upper if x is greater than upper, else return x.

    As R0J0 said, if you're looking for integers, you probably don't need to lerp.

  • random(0,layoutwidth)

    random(0,layoutheight)

  • Programming thinking can mean a few things.

    I think Construct 2 is an fantastic way of learning/teaching logical, algorithmic, and math based approaches to problems. There is a certain mindset programmers need that one can develop with Construct where you work with the fact that computers will do exactly what you tell them to, nothing more and nothing less, and you have to put that logic ahead of your own.

    Construct 2 will not teach other programming essentials like double checking syntax obsessively, clean code, and memory management among other things. It is very forgiving in that sense. How much someone relies on behaviors and pre-made examples without attempting to understand how or why certain code works could also limit how much is learned.

  • It works. https://www.dropbox.com/s/yrsoo9qijm4hbbw/spawnandmove.capx?dl=0

    Probably another event causing the problem.

  • Right click the event and make it an OR block.

    https://www.scirra.com/tutorials/292/gu ... t-features

  • There is a canvas plugin that you can use to draw. The system action snapshot canvas can take a screen shot, which can then be downloaded with the browser object or saved with nw.js.

  • For your controls, add an extra condition checking the angle of the head. Only allow the event to run if the angle of the new direction is +/-100 degrees of the head's angle

  • Also in conjunction with tokenat you will be able to do what you want.

  • So you can move at angles, but your character only faces the four cardinal directions.

    Are you using the 8Direction behavior?

    Then you want to set the bullet angle to Player.8Direction.MovingAngle.

  • What angle do you want it to fire at? Or rather how do you plan to determine the correct angle? Do you aim with the mouse?

  • I also suggest you populate your dictionary by importing (use AJAX) a text file (or .csv spreadsheet, or xml file) as a project file, instead of adding each dictionary key through the event sheet. Working with significant amounts of text in construct can be a pain! I usually use notepad just to keep it simple and quick. The newline expression can also be used as a token for tokenat, which is awesome.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use a "dead zone" to prevent twitching. Have the screen movement event not run unless your input is greater than a minimum threshold away from the resting position. This will help you mitigate unwanted motion from rounding issues or small variations common to analog inputs.

  • You might look into the lerp expression, it can be used to great effect for smoothing values.

    Basically you will use lerp to move your screen a percentage amount towards the actual final values every tick. The result should be that the magnitude of movement is less the closer to the destination value your current value is, and greater the father it is.