How do I replace generated object to real objects in layout?

0 favourites
  • 4 posts
From the Asset Store
Scrollbars with FULL functionality and versatility, just like the ones you can find in AAA games!
  • Hi!

    I have a game thar work with boxes. Each 5 boxes are generated other 5 boxes more etc.

    This boxes contains numbers ands operators to solve a mathematical operation.

    The first box have a number

    The second box have a operator (+,-,*./)

    The third box have a number

    The fourth and fifth boxes contains a possible solution numbers for the equation.

    This boxes pertain a world with obstacles, but as are generated by command (create object), i dont know the specific position where will be created in layout, for that reason, when i put obstacles (sprites) on layout i should to run the game to see if the box was generated in the correct position.

    actual layout with boxes ( i dont know the boxes position)

    Then i want a way to put this boxes in layout (no auto generated), but this boxes have the same behavior, in other words, first 3 boxes to operation, next 2 boxes for solutions.

    When i try to put boxes of this way,

    Something like that

    But in the moment to question the correct answer, all boxes in the layout are converted in possible solutions, and i need only 2 next boxes, and after to pick the correct box, destroy the used boxes and continue with the next 5 boxes in the map.

    i hope you can help me

    here the cap

    dropbox.com/s/axa8zfclv4vgf4f/Game.capx?dl=0

    Thanks you

  • First at all your game looks great and a very nice idea.

    I think I can't really help, your game is quite to big and I have not enough time to understand it completely.

    But I saw in your "SetearCajaResultado"-Function something that bothers me. I don't know if this could be your problem, but the first event in this function, you have an 'and'-block with 'pick all' and 'pick Caja where Caja.AsignarNumero=0'. If your player has a collision all blocks would be picked and all blocks would spawn a number. Anyway, the first condition with pick all should be necessary at all. But this is a wild guess I don't looked your game completely through.

  • Exactly asmodean, i see that!, the function "pick all" convert all boxes in the layout into possible questions, but as always exist only 5, convert the last boxes in questions, but if i change this condition, and i put more boxes through the map, with this function, all boxes will to convert in questions, and i dont know how to asign to question at only last 2 boxes in the operation, without pick all boxes.

    In the code i cant find the exact line xD.

    Maybe is a little problem, but i cannot see that

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think I understood your problem now. You want that if you overlap with the first result box, that the next result box reveal the result too. In the moment it works only if you spawn the boxes in real time during the game, but if you put the (result)boxes all in the layout in places, all boxes at once will show (spawn) the result. It's that correct?

    I've made a capx and I hope that is what you want. It uses the pick nearest condition, so you have to be caution not to set the blocks of result boxes to tight or it could be that the wrong box is picked.

    https://drive.google.com/file/d/0B5FlDY ... sp=sharing

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