Chris PlaysOldGames's Forum Posts

  • Not sure why you are wanting to loop the event, just call the function (I assume that adds the +5) each time something is killed.

    As far as not showing on progress bar.. did you update the bar after adding the +5?

    If you are using a standard X pixel long rectangle then modifying it in increments to make it longer/shorter you will need to redraw it at its new length each time it changes.

    The easiest way to do this is to have an EXP variable that is updated each time something adds EXP and then set the length of the EXP BAR to EXP variable each time it needs updating (every time you change the value).

  • That works too.

  • One option is to create "states" using variables.

    ie. create variable called states=0 and then change it for example:

    idle states: state=0

    running state: state=1

    jumping state: state=2

    attacking state: state=3

    You can then stop/start animations/events based on the conditioning of these variables.

    Example: Space bar pressed, change state to 3. If state=3 run animation stops.

  • This simple tutorial will teach you all the basics of instances and how to act upon them individually.

    https://www.scirra.com/tutorials/37/beginners-guide-to-construct-2

  • If you're looking for 2 different choices on question 2 you could just use choose twice and store the second result in another variable. Then you can condition out for it to choose until choice 2 /= choice 1 variable.

  • As long as your control keys stay the same I would just use layers for each song on the same layout. Make 5 distinct layers, each named after the song and set them to invisible by default. Then when each is needed you can set it to visible. Even if you do change control keys between songs (not sure why you would but..) you could use groups to enable/disable as needed.

  • We will need more specifics if you want actual examples...

    Do you mean a sprite object is touching another sprite object? Yes, easy use isoverlapping condition or oncollision condition.

    Do you mean mouse pointer or touch is overlapping sprite object? Yes, easy; incluse the mouse/touch object in project and use their over sprite object events.

    Do you mean is touching both sprite objects in a certain order? Yes, easy you would just need to use variables.

    Pretty much everything you can do in scripting you can do in construct2.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Start here.. very simple tutorial made by the programmer of Construct2. Does exactly what you are describing with a few tweaks:

    https://www.scirra.com/tutorials/37/beginners-guide-to-construct-2

  • I update my text boxes when I change their value. It's just one extra line of code per and less updating.

    You could also update something like this every x seconds using .01 or .5 and never notice visually but would cut down the number of updates a min drastically.

  • Construct2 events have the following form:

    Conditions: ----------------------- Actions:

    ############################

    Condition1----------------------- Do this

    Condition2----------------------- And this

    (more conditions)------------- Etc

    -or-

    -else-

    etc

    (AND is implied)

    All Conditions must be "met"/true(unless inverted to be false or -OR- is used) before any actions in the event will activate.

    So by making a canShoot var (canShoot is made up.. you could use any name) and putting it in your firing event...

    Condition: ---------------- Action:

    ##############################

    Spacebar pressed ------ Create bullet at gun imagepoint 1

    canShoot = 1--------------canShoot=0

    ---------------------------------wait 1.5 seconds

    ---------------------------------canShoot=1

  • You need to use a variable...

    canShoot = 0

    Then in your firing event condition add canShoot = 1 and after you shoot set canShoot = 0 followed by a wait=(how long you want) followed by set canShoot = 1.

  • Construct2 reads from top to bottom through the "code" aka event sheets. So yeah it would activate the first ones it came to unless you took special steps... you could deactivate all of them before they start so it would always activate the right one.

  • Here is a thread of a similar nature, close to the bottom is a link in my post to a .capx I put together for him. It does more than what you ask... maybe it will help you get your head around how to do what your after.

    https://www.scirra.com/forum/viewtopic.php?f=147&t=182474

    Otherwise, it's pretty simple. Just make a variable called ammo. Every time you fire subtract 1 from ammo. When ammo = 0 set its value back to start amount and play reload animation/sound/ or message.

  • You have to "pick" the instance you want to act on or else all instances will be picked.

    In short you have to figure out a way to single out the instance you want to fire separate from the other instances.

    In my prototype space shooter in my sig I used the technique mentioned by currypuff. My basic enemy ship each shoot at a random time.. it works for the most part. Some of my enemies, however, are picked by distance from player and others using a collision with an invisible sprite barrier... you have to figure out what works for your specific need.

  • Please be more specific... there are many ways to do what you are asking and many different possible expectations.