mindfaQ's Recent Forum Activity

  • Nope, on layout restart set score to pointsatcheckpoint.

    If you want to prevent abuse, make it this way:

    player overlapping checkpoint AND checkpointnumber < checkpointnumber : set pointsatcheckpoint to score

    add 1 to checkpointnumber

    this way it only happens the first time you hit it

  • Oh I didn't know about the container function. Interesting, new thing learned.

  • And the correct position is the one they are created in from left to right? So if it spawns 5 1 2 3 4, you would need to order those cards to 5 1 2 3 4?

    How about changing the correct sequence to something else (like a second random generation of 5 invisible sprites on the same positions and later on check if 5 is overlapping invisible 5 and so on)

  • I can't find a problem with the code. Are there even any events that spawn player? Maybe they are interfering somehow.

  • use a global variable "pointsatcheckpoint" and set it when you reach the checkpoint. Then when you revive, set the score to pointsatcheckpoint.

  • Hmmm, wouldn't that mean you would need to conceal either the random cards at top (so that you don't see their number) or the required sequence on the bottom?

    Like give each sprite a second frame that shows the same card back for every card, set animation speed to 0. Then when the card is laid down, set frame to 1. Then when you want the number of the card to be revealed, for example when it is successfully laid on the correct number, set frame number to 0.

  • sprite boolean "moving" is set: set x to sprite.x+dt*instancevarspeed

    or if you don't want to use speed, but time taken to get from 485 to 1700, use

    sprite boolean "moving" is set: set x to sprite.x+dt*(1700-485)/instancevartime

    If you have a bullet behaviour applied and don't want the sprite to move with this, set the bullet speed to 0. Or if you only want the y-portion of the movement, set x to sprite.x-cos(bullet angle of motion)*dt*bullet speed additionally.

    If you want it to stop at 1700, set

    sprite x greater or equal 1700: set moving to false; set x to 1700

  • rock on collison with object - set rock bullet speed to rock.bullet.speed*0,9

    this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • set text to right(text.text,len(text.text)-find(text.Text,newline)-1)

  • I don't think Construct can parse pixel content.

  • Because collision is only triggered once (inverting triggers like this (they have a little green arrow on their symbol) doesn't work). You can only check for overlapping.

    So use a varible (global or instance):

    player on collision with block: set globalvariable to 1

    every tick

    global variable not equal 1: actions

    and somewhere after this in the event sheet:

    set globalvariable to 0

  • You probably need an array for that. 1 dimension should be enough.

    When the star progress is saved, instead of saving them to a global variable, save them to the array.

    Set Array at (level-1) = stars (with the condition that stars > array at (level-1))

    This way each level got his "stars obtained"-number saved in the array and it only increases if you obtain more stars in the level than last time. Make sure to set the width of the array to the number of levels you have.

    And to obtain the total stars obtained over all levels:

    -(some event that triggers the total stars counting)

    --subevent: set totalstars(globalvariable) to 0

    --another subevent: array->for each element (X) -> add to totalstars: array.curvalue

mindfaQ's avatar

mindfaQ

Member since 12 Oct, 2013

None one is following mindfaQ yet!

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies