Chris PlaysOldGames's Forum Posts

  • [quote:2p1j94s4]You could get around it by creating a 2-D array and adding the names of the tags for a group of sounds to a column/row - this would allow you to place a sound in multiple groups.

    When you want to affect all sounds in a group you could then run a loop on that group, pointing the tag field in the relevant audio action.

    e.g.

    you have sounds tagged "sfx_A", "sfx_B", "sfx_C", "sfx_D"

    array_soundGroups has three groups of 3 sounds:

    0: ("A", "B", "C"),

    1: ("B", "C", "D"),

    2: ("D", "B", "A"),

    To turn off group 2:

    for "i"=0 to array_soundGroups.Height-1)

    stop sound tag "sfx_"&array_soundGroups@(2,loopindex("i"))

    Pure witchcraft!

    Yes that is a good way to do it as well. I believe C3 fixes some of these audio issues.

  • From my understanding of the current limitations of C2 audio plugin you can't control them via group and you can't have multiple "tags".

    So you will need to tag all music event actions with their own separate tag (like "music"), and all sound effects with a different tag (like "effects").

    You might be able to get creative and call them via functions that you kept in a separate group that you could toggle off and on.. if the function couldn't run the effect/music sound couldn't play.

  • My guess would be that they consist of more than one frame and the image points are not aligned?

    If this is the case open the sprite by double clicking it and select the first animation frame. Now set image point 0 where you want the center of the sprite to be and then click the image point tool. Right click the imagepoint 0 in list and select "apply to whole animation".

  • Yes, just use an is overlapping condition.. when not overlapping it is considered to have left the object so you can perform your events to keep it there..

    Another option is to put a larger square under the first and use is overlapping larger but not over lapping smaller to detect when it left smaller square..

    Another option is to put image points on each side of square and spawn/pin solid behavior sprites on all 4 sides and give them and your object the physics behavior..

    You could always do it with some maths too... but yuck. Someone else can xsplain that.

  • Clicker Wizard on Scirra Arcade!

    Only took a couple of weeks. Its a small scale clicker but it has all the elements you need.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Clicker Wizard is a simple idle clicker game. Make gold by clicking the cauldron or buy passive gold generation items and gain gold when not playing! Can you get all the potions and buy all the props to complete your tower decorations?

    Clicker Wizard on the Arcade!

    It is a completed project. Might need a little cost balancing but otherwise its finished. Took about 2 weeks, getting better with this C2 stuff.

  • Basically.. by hit point system you are referring to a variable system.

    You will need a variable that is incremented each time the object is clicked and a test condition that compares the variable value and destroys if >= to your chosen #.

  • Like LukeW said... Make an event simply adds 1 to a "idletime" variable every second. Have another event that conditions to idletime>=(time in sec you want) then action out to whatever animation you want.

    In your movement events simply add a set idletime=0 after each use.

    What will happen is the first event will always try to count idletime up while any movement will always reset it to 0. The second condition will be constantly testing if idletime is greater or equal to your sleep time you decided. As soon as it does that event will trigger whatever sleep junk/animations you action out from the event.

  • What error?

    There are two versions of Construct 2.. 32 bit and 64 bit.. if either computer isn't compatible with the type you have that could be it.

    I keep both 32bit and 64bit installs on my thumb drive along with my registration file. My work PC is 32bit. My home 64bit. When at work I can pop in thumb drive and run 32bit one and then load my capx.

    However, you say you copied an existing install onto another PC? This alone could cause a hundred errors.. you need to install a fresh copy.

  • The object only needs to be on "a" layout somewhere in the project at the start of the initial layout. Once the start layout is loaded all sprite objects can be deleted and still be accessible via spawn. I use two methods myself. One for static sprites where I put them all in a family and on-start of layout destroy the family. Second are things that start with bullet or movement behaviors enabled. Sometimes I simply put them behind a killer sprite and have an on-overlap with killer sprite destroy them after start.

    That said, I don't believe your lag is from your object creation... unless its massive. You may need to post your .capx to get to the root.

  • [quote:2m58egmw]chrisinfinger: Where do i find the .capx file? do i need to buy license?

    The capx is in the left column beside the tutorial.. its under heading "Tutorial Downloads". Not sure if it was made using objects requiring pro license though.

  • Or you can do it the more complicated way...

    https://www.scirra.com/tutorials/5359/non-overlapping-ai-for-top-down-games

  • I tried to recreate and it worked for me. I even tried to break it so it wouldn't... and couldn't. Not sure what you did.

  • Arrays would be the much cleaner and shorter code way to do it.. and you will only help yourself by learning them.

    You can do it using just variable as I pointed out above but your code will be 3x as long.

  • Good local storage tutorial. It is the part the other tutorial seems to be out of date on (it's using old webstorage).

    https://www.scirra.com/tutorials/1461/how-to-use-the-localstorage-plugin