codah's Forum Posts

  • I'm taking a wild guess here at exactly what you want..

    Create an Array with the values that are the 'pool' of numbers to choose randomly from. Each time you choose 2 (or whatever) random numbers from this list (by index) remove them from the Array (using delete), so they cannot be repeated in further choices.

    I'm using this technique when choosing where to spawn enemies, when there is a fixed number of 'zones' in which to spawn, and I don't want any spawning on the same zone.

    If what you really want is just 0 and 1 as in your example, then there are simpler ways.

  • Check the capx... I picked the object by mouse right-click but you could give them a unique number (other than the UID) or a name, etc. As you can see the individual HP variable for each object is changing separately. Go to the layout and set HP of each instance in the editor.. it will still work.

  • Pick the member object.

    Set the variable.

    Edit: I have updated my example from the other forum where you asked this. Let me know if it helps.

    [attachment=0:3ddb38in][/attachment:3ddb38in]

  • About the drag and drop, why don't you do a quick test? I haven't used drag and drop but I'm presuming that when you have 'dropped', the sequence is over and you can then just sense another click/touch to shoot the fireball. As far as spawning in the right place, create an Image Point on your dragon sprite in the right place, then get the Dragon to Spawn Object using that object point. why take the discussion offline when others can benefit?

  • I'm no expert at C2 but your question got me to experiment a little. Have a look at the capx and see if it helps at all. The thing is, you shouldn't have to think in terms of specific enemy objects most of the time as C2 does that for you. The sample has 2 enemy types, in the same family. Collide the red box with the others to see how their HitPoints instance variable changes for each instance.

    It has a simple function too so you can see how they work.

    [attachment=0:1ehguofs][/attachment:1ehguofs]

  • Oh ok! I have not used list controls I'm sorry. I'm sure somebody else can help you.

  • It's 3 years ago... however I'm curious if that screenshot was of his game or just showing the original. I mean it has all the copyright messages and everything

  • Depends on whether you want the perks to persist between games. Do you save game state already? If the player object is not destroyed between levels, you could use instance variables. If the player is destroyed then you would want global variables or static local variables. Or you could use an Array and save to a JSON file, then re-load it each game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Edit: I removed my description and added a capx instead

    [attachment=1:snsuglc6][/attachment:snsuglc6]

    Edit 2: the above is more of a 'when clicked, start timer'. Below might be closer, or at least help in some way

    [attachment=0:snsuglc6][/attachment:snsuglc6]

  • Can you give more detail? What do you mean by a 'list', do you mean an array? I assume 'to have an item selected' means selected by the user, on-screen? What are the 'items'?

    If you have a long list of Text items in an array, and you want to populate another array with a subset of the large array, you can delete the items (in an Action) then export that to a JSON file and then re-import it into the other arrays (or edit them offline into sub-files). Depends on what you want. There might be a more advanced way I don't know of.

  • Kind of like a fog of war? For the link just replace the . with dot and with at or something

  • Oops forgot the part about the 'limit'. It was late... I was tired 😀

  • I did a slight mod, seems to work better. Funny, but I removed the min(). Hope it helps.

    [attachment=0:2zjcp3ke][/attachment:2zjcp3ke]

  • I just gave you one general technique. You need to work out how to display them in the places you need them. Just calculate the X and Y for your requirements. Happy to help out more if you can't get it working. Maybe post another capx that you have tried.

  • Yes I looked in the Play store description after, but just a simple screen is nice That technique is similar to how I pictured it, it's quite effective. More enemies would be good.