lionz's Forum Posts

  • Yes global variables will be fine for a settings menu.

  • Global variables are saved between layouts so if you move to one it will keep that data. The number of cards would be one variable and the difficulty could be a text i.e."easy" or a number variable. Saving the game is a very different thing, you can use local storage (see manual) to save variable data and load it again next time, and Ashley's tutorial is linked on there about how to make save games.

  • No pathfinding required, I mean based on the information that I have, depends if your game is more complicated than it seems. Plants vs zombies is just simulate control left towards the left side of the screen, the action 'simulate control left' moves the enemy as though the enemy is pressing left key.

  • If you're trying to do something like plants vs zombies then you should really be using 8-direction behaviour with simulate left/right for simplicity of moving left or right across the screen.

  • Do you mean a playable prototype? Yes Construct is good for that.

  • So what you currently have is 25% chance of each right? All you need to do is set the setCreate variable to floor(random(100)) which gives you 100 numbers from 0-99. Then on the conditions you use ranges so setCreate is between 0 and 69 for the wood, 70 and 93 or stone, 94 and 98 for gold and if it is 99 then diamond.

  • Yep, did that resolve it?

  • Based on the lack of info the only way of answering this is to agree and say yes use variables. What do you mean by save your settings, you mean save the game after it is closed or save the choices picked going to a new layout? If the latter you use a global variable.

  • Set bullet enabled/disabled.

  • A beginner's method would be to create invisible trigger sprites at the exit areas of a room. On the trigger you have an instance variable, where the value is the name of the next layout to go to. On collision with this trigger you go to layout 'trigger.variable'. This involves building each level as a separate layout.

    A more advanced method would be something like reaching an exit in a room, then during that fade you would rebuild the tilemap data to create a different room, usually a json format string which contains the data for the tiles. This builds the new room in the same layout, but you would need to define logic for where the player spawns and probably store room data in an array.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you do pick by evaluate, pick sprite_fighter where sprite_fighter.squad=x. Then set a variable to sprite_fight.pickedcount, the variable is the number of sprite_fighters where squad=x. You can then use this variable to compare if its 0.

  • What I mean is you have set 2 variables to 1 and 2 but they don't do anything beyond this. Where is the logic that uses the variables?

  • You create the tilemap first so it puts it at Z order index 0 on layer 0 then you create the sprites after this at index 1 and 2 on top of the tilemap. So you end up with a different Z order than what was in the layout view, not a bug though.

  • If each level is a different layout then you should be able to get away with - end of particular layout set global variable to x. Then back in the menu if lock.variable = to x, remove lock.