codah's Recent Forum Activity

  • Add an event.

    Double click 'System'.

    Start typing 'f-o-r' to narrow the choices; you will see For loop is an option.

    Are you using Pick Random Instance?

  • Welcome to C2. I don't think you'll regret getting the licence. Looks like you've discovered 'emergent' AI Good effort posting a screenshot after just a few days.

  • Sorry I had to leave but it was late here 😀 I hope you got it sorted.

  • 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]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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]

codah's avatar

codah

Member since 30 May, 2014

Twitter
codah has 1 followers

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies