Guizmus's Recent Forum Activity

  • You have to go in the folder where you installed it, and delete it.

    In C2 directory, exporter/html5/behavior/ or exporter/html5/plugin/, depending on what it is. Then, restart C2. Careful, all projects using this plugin won't be able to open after this.

  • Well... that seems like a buggy project. Care to share so we can take a look ? Or maybe just start copy pasting everything from the first project to a blank one...

  • cesarzevil like Juryiel said, you must first decide if a ball between 2 other same balls should or not be destroyed, even if those 2 other balls don't touch themselves.

    • if yes, then the method I described should work nicely
    • if no, then it's more complicated, you would have to store the Ball.UID of all touching balls, not just the count, and then check if those are next to each other or not.
  • And if I want to mute more then 1 sound with a click do I use "SoundCollision""SoundPickup"? Or with + betwhen them or &, what?

    The screen you posted isn't the right logic.

    What the program will do is :

    • Ev1 : on the Mute button clicked (any click, first or not) => mute the music, set the variable to 1
    • after Ev1, if the variable is set to 1 (witch will be the case, since you just set it to 1), unmute the music and set the variable to 0.

    Here is another implementation that should do it properly : example

    You should use "onTouch" events from the touch object, since it will simulate an "onClick" too, but not the other way around. Though, on Buttons, it will work both ways.

    If you want to mute multiple sounds with a single click, just mute them one after the other, where you muted/unmuted the background sound. If you want to mute all sounds, you can change the general volume too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Either, it won't change. The "problem" you described just now is during the powerUp collection, not spawning. Either way would be usable later on. But personally I would go with multiple objects in the same family. It seems the most easy to scale right now.

  • Well, collision isn't made for 3 objects at a time, so it's not easy this way.

    I would start by making an "evalSystemState" function, that would eval the system every 0.1s or so. It would examine every ball, one after the other, checking how many other balls were in its vicinity and saving this in a variable on the balls. Once this is done, you would just have to destroy every ball that have 2 or more in this variable.

  • LittleStain Thanks ! Didn't know this one ! It will simplify a lot of things :) (btw, nice new avatar ^^) Thanks again !

  • How are your power ups organised ? Are they all the same object, with different animation/frame ? If so, you just have to spawn one power up, set its animation to "floor(random(3))+1" (witch will sent back 1, 2 or 3, so add a prefix before it) and you are done.

    If it's different object, you will want to make a function "spawnPowerUp" that will start by doing a random, storing it in a local variable, and then will instance an object depending on the random. Example in this link.

  • Hello,

    You should do the tutorial if you didn't already.

    That being said, you want something like this, where the "dancing" animation is looping :

    example

  • Hey,

    I'm confused with your problem. What you describe isn't the normal way for C2 to work, so we must be misunderstanding you, or you have a buggy install.

    When you say "set Layout One to Event Sheet 1", you mean in the property bar, in the "Event sheet" field of the "Layout 1" properties, right ? If not, please explain where you set it.

  • xxbbcc There is no Return statement in C2's Function object.

    You can set the return value of a function at any point, but that's it.

    One trick you can use is to add an event "if myLocaleReturnValue is still 0" to every event that shouldn't be triggered once the return has been decided, but that's it. It won't be clearer than using Else.

    In the last part of your initial post, you asked if there was a way to inject JS into C2. There is, and you don't need plugin for this. The Browser object (or the System, I'm not sure right now) has a "evalJS" property (to be used inline, will be evaluated and the return value will be sent back and used in the expression) or a callJS action (to be used as a complete event). So a solution to your problem would be to write a function in javascript that will return the value you wanted in C2. You will give it arguments through the evalJS function, transmitting the useful state data you need from C2, and will be able to use the return value in C2.

  • The default save system is like this : it saves everything except the nosave behavior objects. If you want to do another type of save, you have to do it manually. This means create a function that prepare your save and store it (in local storage). Then do another "load" function that loads the game from the local storage.

    Local storage is a cache system letting you store datas through different sessions. It is a local system, meaning the same user going from a computer to another will lose its save. If you have a login system, you could also save it online.

Guizmus's avatar

Guizmus

Member since 26 Mar, 2013

None one is following Guizmus yet!

Trophy Case

  • 11-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies