LittleStain's Forum Posts

  • Ah, so you are trying to recreate mastermind, but with numbers instead of coloured pins..

    I guess using a string for this would do and using tokenAt to see if the number exists in the right place..

    Using an array would also be an option..

    After the player has guessed you could loop through it to see if the number exists and if so if it´s in the right place..

  • If I understand correctly you would like to know if the speed is decreasing, to play a different animation..

    You could give the player sprite a varaiable Lastspeed and every x seconds check if this last speed is higher than current speed

    system every x seconds

    system compare two values player.lastspeed > player.speed

    player animation deceleration is not playing

    • player set animation to deceleration

    and add an event AFTER this one to set player.lastspeed to player.speed

  • Have you looked at the sine behaviour, for I guess it will do exactly what you'd like..

  • With pin I was referring to the pin-behaviour instead of setting position every tick..

  • There are so many ways to set something like this up, I'm not sure which way to choose to explain..

    I guess I would opt for using litetween instead of moveto, for you could use the same tween-time for both objects..

  • The on start of layout event is only checked once, but if you'd like events at other times to not even be read by construct, putting them inside a group in the event sheet and de-activting that group would do the trick..

  • "from left to right" should become "from top to bottom", because x=0 is left and y=0 is the top..

    You've probably got some > and < wrong and some - and + because of that..

    I'm not in the opportunity to download at this moment, but you might want to look if what I said is the case..

  • You could create two "Finger"-sprites which are controlled by the thumbsticks and have the plate either pinned by location only, or via physics revolute joint, or just set the angle of the plate to angle(fingerleft.x,fingerleft.y,fingerright.x,fingerright.y)

    Issue with the first two solutions is ofcourse that the plate becomes shorter in the horizontal direction when the angle get's bigger, but there are multiple ways to take that into account..

  • If I understand correctly the cone of view is relative to the objects angle, so that should be no problem if the behaviour is on the player object..

  • every tick is framerate dependant, search for delta time dt and/or framerate independant movement..

    also instead of setting the character every tick, why noy pin the character to the playerbox?

  • set highscore to int(webstorage.localvalue("highscore")) will work as explained in the manual..

    Webstorage is stored as a string and a string is NaN (Not a Number), to convert the string to an integer(number) you use int..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could wait untill the next official version is released, but that might take a while, for this is only the first beta since the last official one..

  • 179 is a beta version, the link to download it is at the bottom of this page under downloads..

  • While saving to webstorage you create a string..

    To convert it back to a numerical value use int(webstorage.localvalue())..

    It might also be wise to add a subevent to check if webstorage exists before setting the global value, for else it could give unexpected results when first played..

  • It seems to me, this is a perfect example for when to use containers..

    Another way would be to bind the timer to the enemy by UID..