How do I do specific task to go to the next layout?

0 favourites
  • 5 posts
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • Hello. I'm still pretty new at this and was wondering how do I use multiple objective/task to move on to the next level/layout. The game I'm making is a math game (ikr) that you have to hit box that has a certain numbers on it to add/sub/multi/divide to get the correct answer in the end. Which makes you go it to the next level (going through the blue door ). When thinking about the way I can do this. It was way easier to just hit specific boxes to go to the next Lvl instead of just making the code count ur numbers to equal the right answer. Is there a plugin that can help me do this or if not. How do I write this in the events? This will help a lot. Thanks

    Here is a picture of an example of a level and how to solve it to go to the next task. There isn't any boxes with numbers on it, because my teammates are still working on it.

    The blue arrows are where the player suppose to go for the right boxes and the door is the end point and will only open if they get the right boxes.

  • This is a rough thought, but I wanted to give you some ideas. I'm typing this half-awake, pardon me if it doesn't make sense.

    Give the box a variable, say, SequenceNumber. The first box you are supposed to touch would have a value of one, the second, two, etc.

    The player could have a variable called CurrentSequence, set to 1.

    Give the player another variable, CorrectGuesses, set to 0.

    Give the door a variable called LevelGuessTotal and set it to n (n being the number of boxes you have to hit, 7 in your example).

    Player hits correct box

    Player collides with box (or presses button while overlapping box)

    +

    Box.SequenceNumber = Player.CurrentSequence

    -> Player.CorrectGuesses + 1

    -> Player.CurrentSequence + 1

    Player hits incorrect box

    Player collides with box (or presses button while overlapping box)

    +

    Box.SequenceNumber != Player.CurrentSequence

    -> Player.CorrectGuesses - 1

    -> Player.CurrentSequence + 1

    Activate Door

    Player collides with box or presses button while overlapping box)

    +

    Player.CorrectGuesses = Door.LevelGuessTotal

    -> Open Door

    else

    Door doesn't open

  • I knocked together a (really, really hacky. Seriously, you should probably clean this up!) example of this. Basically, I generate a value for each door, choose 2 and add them together to get the solution, and then listen for input over the door. If you press X over a door, it adds it to a value on the character, which I've displayed over its head. Then, if the character's value matches the value of the door and you press X, then a win message is displayed. It should be enough to get you going in the right direction. You might want to add a variable for operators, for example.

  • I knocked together a (really, really hacky. Seriously, you should probably clean this up!) example of this. Basically, I generate a value for each door, choose 2 and add them together to get the solution, and then listen for input over the door. If you press X over a door, it adds it to a value on the character, which I've displayed over its head. Then, if the character's value matches the value of the door and you press X, then a win message is displayed. It should be enough to get you going in the right direction. You might want to add a variable for operators, for example.

    Wow this was actually was my first idea in the begging, but it seem though. This will help, but I was looking into the events and it was very hacky. Is there way to put some general comments in there to help sort it out? Also It suppose to destroy the box after it click it, but seems like an easy fix. This helps me a ton. Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is a rough thought, but I wanted to give you some ideas. I'm typing this half-awake, pardon me if it doesn't make sense.

    Give the box a variable, say, SequenceNumber. The first box you are supposed to touch would have a value of one, the second, two, etc.

    The player could have a variable called CurrentSequence, set to 1.

    Give the player another variable, CorrectGuesses, set to 0.

    Give the door a variable called LevelGuessTotal and set it to n (n being the number of boxes you have to hit, 7 in your example).

    Player hits correct box

    Player collides with box (or presses button while overlapping box)

    +

    Box.SequenceNumber = Player.CurrentSequence

    -> Player.CorrectGuesses + 1

    -> Player.CurrentSequence + 1

    Player hits incorrect box

    Player collides with box (or presses button while overlapping box)

    +

    Box.SequenceNumber != Player.CurrentSequence

    -> Player.CorrectGuesses - 1

    -> Player.CurrentSequence + 1

    Activate Door

    Player collides with box or presses button while overlapping box)

    +

    Player.CorrectGuesses = Door.LevelGuessTotal

    -> Open Door

    else

    Door doesn't open

    This looks like it can work. Looks good thanks, but I'm now changing it up a little.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)