XManBG's Forum Posts

  • If the file could be online - AJAX and a small PHP script on your server should menage your save/load needs. This could be the difficult part, because you have to check many possible incoming and outgoing information cases.

    If you would like to keep it locally, maybe the cookie plugin is exactly what you need:

    http://www.scirra.com/forum/plugin-Cookies_topic51805.html

    I don't think there is another C2 easy workaround way to use a local file from within your browser.

  • Yep, I've tested your file on my side with Mozilla r15.0.1. Same issue + following two error pop-ups (either - or):

    A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.

    Script: localhost/layout.js:352[/i]

    A script on this page may be busy...

    Script: localhost/common_prelude.js:638[/i]

    I've tried to change the Touch event with normal Mouse on any click event - same error. Further tried to change to "System go to layout by name action" - same error.

    <font color=red>And last, I've changed your Array to be Global (it was Local) - and voila, it works!!</font> Maybe it is just a C2 logic issue, i.e. C2 is confused to make the Array not global, because you have more layouts, and which one should be the Array owner?! ... anyway, I'm also confused about the option Global regarding an Object?! If it is a visual object, it belongs automatically to a layout. If it is a Data & Storage object, and has to be layout specific, i.e. local/private, this has to be selected somehow.

  • R122 beta still crashes on exit under Win7 64-bit.

    Windows makes some dump files, which I have uploaded here:

    Dump Files zipped

    Here is the given information:

    Problem signature:

    Problem Event Name:     APPCRASH

    Application Name:     Construct2.exe

    Application Version:     2.0.0.0

    Application Timestamp:     5140bca2

    Fault Module Name:     Construct2.exe

    Fault Module Version:     2.0.0.0

    Fault Module Timestamp:     5140bca2

    Exception Code:     c0000005

    Exception Offset:     00000000003f1f21

    OS Version:     6.1.7601.2.1.0.256.48

    Locale ID:     1026

    Additional Information 1:     8a3f

    Additional Information 2:     8a3f09adb6b71b3cc86e302f9701049f

    Additional Information 3:     41a2

    Additional Information 4:     41a20447ca516aa9e4d9605bc5da3e6a

  • To keep the buttons not changed from the layout scale, position them on a second layer and set its Scale rate property to 0.

  • :) Not bad if you consider that is your first game

  • I've just experimented with that Sine Reset function and noticed, that the period offset and period random offset were not considered. So here is an extended code (actually a copy-paste from the Sine initializing function), which considers those two:

    runtime.js

    Acts.prototype.ResetWave = function ()

    { if (this.period === 0) this.i = 0;

       else { // if some period offset is given, it should reset to that offset

         this.i = (this.properties[5] / this.period) * _2pi;

         this.i += ((Math.random() * this.properties[6]) / this.period) * _2pi;

       }

    };

    I've compiled an example with the extended Sine behavior, which can be seen here. The reset here demonstrates repeatable 0.25 to 0.75 sine cycle, instead of continually going back and fort.

    (Of course in that particular case, there could be a workaround with an ABS() function for the falling (minus) sine function):

    EXAMPLE / CAPX

  • Thanks vee41, with trigger once it works as expected. It shows the numbers from 2 to 12 once on the screen.

    <img src="http://www.colarion.com/construct2-test/strange_for_loop2.jpg" border="0" />

    Anyway I'm really wondering in what situation you could need the For-Loop to runs to eternity and not only once from 2 to 12?! It seams without Trigger once to be unusable?!

  • Yes, that was my theoretical expectation too!! But... in real C2... I just would like to write out the numbers from 2 to 12 on the screen. Sorry, maybe I don't understand the C2 programming logic. It would be realized that way with a common programming software. Please try this at home. No key press, no touch, no mouse.

    Strange For-Loop Behavior CAPX

    <img src="http://www.colarion.com/construct2-test/strange_for_loop.jpg" border="0">

    ... results in ... <font color="red">Please, note that it starts with 1 and goes to 12!! Furthermore, I'm expecting loopindex to return the numbers 2 to 12.</font>

    <img src="http://www.colarion.com/construct2-test/strange_for_loop_result.jpg" border="0">

    XManBG It does run exactly 11 times... every time you run that event. If you have it run on key press then it will loop 11 times when you press the key. If you have it running every tick then it will loop 11 times every tick.

  • Please, let me ask here a question about the For loop. Why does it run over and over again??

    I'm expecting, that an event "System For "" from 2 to 12" will run exactly 11 times and stop. Unfortunately that loop executes the actions continuously without stopping?!

  • Hi again, I've taken a look at the Sine Behavior code. If I'm not wrong, it should be enough to add following code to add a Reset action:

    edittime.js

    <font color=blue>AddAction(5, af_none, "Reset", "", "{my} <b>Reset</b>", "Reset the wave function.", "ResetWave");</font>

    runtime.js

    <font color=blue>Acts.prototype.ResetWave = function (){this.i = 0;};</font>

    I've tested it. It works as expected. On Reset, the Sine function starts at 0. Maybe you could test it too, and it could be added to the next C2 issue??

  • Nice example <img src="smileys/smiley1.gif" border="0" align="middle" /> I was on the way doing something similar.

    rojohound, is it possible to add to the Plug-In expressions, the actual/last Path (pen) coordinates X,Y?? Sometimes could be very useful just to save them, especially after the Arc drawing command.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • +1

    Me too. I'm using the suggested behavior in my games. It's much more intuitive and user friendly.

  • Hello C2 development team,

    I'd like to point out a missing feature of the Sine Behavior:

    I'm missing the Sine Reset action. Once the Sine is activated it oscillates back and fort to the eternity. If set to inactive and back to active, it starts exactly from its last value, which is not always wanted.

    For example, if I would like to perform just a quarter period movement (progress 0 to 1), I'm using a condition to stop, i.e. inactivate the Sine behavior. Later, I'd like to repeat on the same object that quarter period movement from the beginning (progress 0 to 1 again), and not as noted from the last progress point (1 through 0 to -1). For now it appears to be impossible...?!

  • You are right, thanks. It is possible to animate morphing shapes by drawing and clearing in a row.

    I've noticed, that there is no functionality regarding Canvas Origin and additional Image Points. The appropriate button is gray. Speaking of shapes, there could be always the need to create procedural some "sticky" points on that shape, to Pin (behavior) other objects on them... Do you think it could be implemented?? Or maybe there is a way right now, but I still don't know how to use it?!

  • :) Thanks for that tip. Actually I should notice that the asking was about a polygon Plug-In, and not about a shape Plug-In.

    According to Yann, there is much difference in-between, which is strongly correct. I have to play a little with his Polygon Plug-In to see if I could make custom rounded corners of a polygon without Bezier curves...