Heptagono's Recent Forum Activity

  • Already Solved! You can find the solution implemented in the proyect.

  • Hi everybody!

    I'm trying to control some sprites in a game through the use of a special kind of slider that allows to introduce values both by the slider itself displacement and/or a typing a value directly in a text box.

    But, I'm unable to control properly the position of the sprites. While it seems possible to do that using the text box, the slider doesn't work but for showing the values in the interface.

    Any help or advice would be appreciated.

    I've left the project here:

    dropbox.com/s/m2pzy9ki58bo2u3/Runner.capx

    Any ideas?

  • Thanks a lot for your answers. Issue solved!

  • I have a project wich I've focused in certain way. I would like to know if it's a good perspective, a nice plan. Or it's a bad concept.

    I want to create tree different games on a website. But this three games would share data among them. This data will be saved in the website thanks to the Webstorage asset in Construct 2.

    The first game will share data in real time with the two others. And the changes will be visible in real time too.

    ?Do you think this is possible?

  • Thanks to all for your wise advices and dedication. I've properly finished the project, using an unidimensional array with three elements.

    Afterwards, to emulate the switch command of C, a chain of If-else has been made to allow control over the different sprites that make part of the light beam.

    Buttons are active and not only change the visibility of the sprites, they change also the values of that array.

    As it seems that Construct2 does not allow to pick up more than one instance in a condition, this is the way that solved the issue...(Among a handful of other ways, of course.)

    And thanks of the help from the people of the forum!

  • Interesting.

    Such thing could be done as well with two arrays?

    One of them for the sprites values selected by the buttons, and the other as a Registry. Comparing them we can solve the matter and modulate the opacity of the lasers.

    How do you like that?

  • Wow! That was the clue I was looking for!

    You're great! The issue is properly solved.

    Two thumbs up!

  • Hi, everybody!

    Look, now I'm at the final stage of a program.

    project

    I have applied a truth table.

    We can have some sprites present or not. These are the possible combinations:

    OOO

    XOO

    OXO

    OOX

    XXO

    XOX

    OXX

    XXX

    Where a 'X'means the sprite is visible, and the 'O' means it is not.

    The opacity of the laser beam changes depending on a formula that includes angles values for each sprite's instance.

    I have thought to act like in the 'case' operation in C or Java.

    But in this case...It seems that it does not work.

    Do you have any idea about the reason?

    Thanks a lot in advance. I left to you this project if it is usefull for somebody someday.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here we are, again trying to finish this project. So far, we have done great improvements and advances learning about Construct 2. But, now things turn into something a bit more difficult.

    As you can see in the project, there are 3 sliders supposed to control 3 different sprites. While each slider shows its value on a different textbox, the value affects all the instances of the sprites. It's quite a mess.

    I would like to know, how to solve this. It is possible to assign each slider and textbox to an sprite instance? Is correct the code as it is now?

    Here the challenging project:

    project

  • Thanks a lot, man.

    When I have to pick up the value typed in the TextBox, I add this expression allowing me to avoid values under and over the range from 0 to 360.

    float(TextBox.Text)<=0? max(0,float(TextBox.Text)):min(360,float(TextBox.Text))

    I've used the expression that you have posted before, with this '?' and ':' that allows to program a condition with code directly on a line.

    And it works!!

    I find that this world of expressions gives a lot of power and flexibility to Construct2.

  • project

Heptagono's avatar

Heptagono

Member since 25 May, 2012

None one is following Heptagono yet!

Trophy Case

  • 12-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies