Heptagono's Forum Posts

  • Hi everybody!

    I was wondering how to fill a geometric shape with color in the wonderful Canvas plugin found in this forum.

    So, I've tried to do so in this project. But something gone wrong. It seems that the floodfill command doesn't work fine:

    Anyone had faced the same experience?

    dropbox.com/s/7tz6c2fdatu33si/floodfill.capx

  • That was near the solution, thanks! But for some values, the line breaks.

    The formula I have finally used and works fine is:

    Y=((((X-x1)*(y2-y1))/(x2-x1))+y1

    Where x1,x2,y1,y2 and X are known values.

    Nevertheless, thanks a lot!

  • I had 2 points known. All are moving al time, like particules in a fluid. The thrird one is a wall. So I know only it's X. The only thing to find out is the Y.

    Because of that I must be careful of two moving points to obtain a straight line.

  • It works! Due to a factor: The final X is always known. The only thing left to find out is the Y. Easy!

  • Perhaps, this could be useful:

    If I want to have an X and Y whatever points in this space, I can use:

    ((X -x1)/(x2-x1))-((Y-y1)/(y2-y1))

    What do you think?

  • x1 is constant, y1 is variable.

    x2 is variable, y2 is constant.

    The ray (represented by this line, must go further x2,y2 to the infinite.

  • Yes, but there is a problem with that: The line must be straight. And the points 1 and 2 are moving all time...

    Seems quite difficult...

  • Humm

       I have a canvas object. And...

       I was wondering myself how to draw a line depending on three points. It's compulsory that it it passes through three points due its a light ray and a prism...

       But I only see an action wich is :Draw Line from X1,Y1 to X2,Y2 ...

    �Any experience in this?

  • Hi folks!

    I'm intented to spent this hollydays into development of a wordpress plugin that allows users to load html5 games exported by Construct 2, into pages, categories or posts of their wordpress blogs.

    By now, I solve the situation just adding an iframe that contains a isolated html website containing the html5 game. But this is not a clean solution, due to the security problems associated to iframes.

    Therefore, my aim is to develop that plugin and to share it with all the community. But, How can I start? Anyone is already in this project? Any idea on how to start it?

    Greetings!

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

  • Try Construct 3

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

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