lionz's Forum Posts

  • What is your logic for movement, you simulate control every tick then wait 0.03 seconds? Let's see the events for enemy movement.

  • Looks good so far, can't really review it without playing it though :)

  • Not sure I'm fully understanding it but let's say it's 5 'levels' or characters and in each level you can pick correctly or incorrectly and then it moves onto the next question. Each question is represented by a row in the array so 0, 1, 2, 3, 4 are the questions and correct is at Y=0 and incorrect is at Y=1.

    You would have a question number variable which starts q=0.

    Then the logic is, whenever a player selects a colour, if correct add 1 to array.at(q,0), if incorrect add 1 to array.at(q,1)

    Then when the question is over you add 1 to q.

    So your array corresponds in this way

    question 1 | 0,0 | 0,1

    question 2 | 1,0 | 1,1

    question 3 | 2,0 | 2,1

    question 4 | 3,0 | 3,1

    question 5 | 4,0 | 4,1

  • It's still not well explained, better you try to explain the game more. What 5 slots?

  • Almost the same then, push correct variable to back of X and set array.width-1,1 to incorrect variable.

    This leaves you with

    correct | incorrect

    correct | incorrect etc

  • If there is no real issue about which one of the overlapped enemies is destroyed you could use enemy > pick top to choose the enemy highest in Z order and delete that first.

  • I would do it like :

    Correct clicked - push 'correct' to back of X

    Incorrect clicked - push 'incorrect' to back of X

    So your array may look like this

    Correct

    Correct

    Incorrect

    Correct

    Incorrect

    Then when the width is 5, i.e. 5 results in the array, you can begin to pop the array at the same time which removes the top result as you add a new result. This is then a list of last 5 results.

    If this doesn't help then what you mentioned 'Now i want to record last 5 play's result and next play have to add and remove previous accordingly.' needs to be better explained.

  • 'push' the latest click to X on a blank array, when the array width is 5, start to 'pop' one result from the array that removes the oldest as you 'push' the latest one to it.

  • Cool, both games look interesting!

  • This looks like something where you didn't need to use an array. I can't work out what you mean from the description though, maybe you could draw it or share something?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Assuming the object is destroyed when it explodes you can do :

    on X pressed with condition global var=0 : action=spawn grenade and set global var=1

    on grenade destroyed: set global var=0

    The problem with that is you are counting on it to be destroyed and may come across bugs when it doesn't get destroyed or something.

    You can also use a timer if that is relevant :

    on X pressed with condition timer=0 (on another object not the grenade) : spawn grenade, start timer

    Note you can't use the object for timer condition, use system compare 2 values, object.timer.currenttime("timername")=0

  • I would've done it a bit differently, just had one tile object where you change its type based on another instance variable. I'm not sure what your logic is for picking the starting (assumed player overlapping) and destination tiles, so cannot really see the problem.

  • Check this and the section on 'Changing the project after saving'. construct.net/en

  • Try a simpler game idea ^^. You can store the position of planets in an array. As for the on planet gameplay, it depends what type of game it is but everything I see about procedural generation includes the use of arrays so you'll most likely have to use them eventually.

    Maybe you should chat with this guy: construct.net/en/forum/construct-2/your-construct-2-creations-23/dark-ages-spatial-roguelike-rt-141827