eli0s's Recent Forum Activity

  • Hello all, I was wondering, how do I stop an animation while another one is already playing? For example, in my code below, when the player releases any of the buttons, the animation will revert back to "shoot" (which is what I want), but, how do I make an exception saying that if the 'Character' collides with a specific object, it will play "characterStarAnim" (another character animation) instead of automatically reverting back to the "shoot" animation?

    Thanks,

    guannstar (FNORD)

    Add an other condition to the event with the "on any touch end":

    • animation characterStarAnim is not playing (invert the is playing).

    That will hopefully prevent the "shoot" animation to trigger while the "characterStarAnim " is playing.

  • Well, you can repeat an action to your heart's content, but that will happen after you run the layout, you wont be able to see the result in the editor... But you're welcome!

  • on start of layout

    repeat x times ----> system|create *x_object* on layer *Y* at ( random(LayoutWidth), random(LayoutHeight) )

    -EDIT-

    Oh sorry, this isn't what you want. You want to create and distribute the objects randomly from within the editor, not at run time. There isn't a way that I know of...

    Closest thing for variation purposes is to do what Hardty said.

    on start of layout ----> x_object | set position to ( random(LayoutWidth), random(LayoutHeight) )

  • Yes, the best practice will be to test again and again on your target devices. But, just like keroberos said, the decimal value doesn't seem to affect performance in any practical way.

    Anyway you're welcome

  • The only way to do it is with the Canvas Plugin. It doesn't come with Construct 2 by default.

    Download it here: https://www.scirra.com/forum/viewtopic.php?f=153&t=64239 and install it.

    See how to create line in this amazing example made by XManBG https://dl.dropboxusercontent.com/s/y9asncfrt721jey/mouseCanvasDraw.capx?token_hash=AAG1GHw-Rje_LPt7R6v14V8GLwW1PJ6kV2xDS7dXH_c0GQ&dl=1

  • You can play only one audio file at the time if it's imported to the Music folder. If you want multiple audio files overlapping each-other you have to import them into the Sounds folder. Please be aware that unless you preload those sounds on start of layout, there will be a delay in hearing those sounds, especially if the files are large in size (you will appreciate the delay when you upload the game online, in preview mode you won't notice since it runs from the disk).

  • The grid follows the X/Y coordinate system whereas 0 X and 0 Y are on the top left corner. You can't change that.

    The resize thing is a bit tricky. Basically, if you change the value and don't hit enter/return or click somewhere in the ribbon, the values won't update. The tricky part is that in order to see the changes, you have to click inside the layout, otherwise the grid won't update.

    So, change value->hit Enter/Return or click anywhere on the ribbon->click inside layout->Done!

  • I have no experience with mobile and this is a very technical question for my understanding on how computers calculate internally.

    That being said, it is certainly possible and I don't believe there will be any difference performance wise. Construct calculates with float numbers so the .5 wont "confuse" it at all.

    The only thing that comes to my mind that is related to "performance" is the pixel rounding. If for some reason in your project settings you have the pixel rounding to on, then perhaps every now and then this .5 value will be round up (or down) and that might cause a 1 pixel jump which may be noticeable.

    • EDIT- That doesn't seem to affect performance neither. Check the following example -input decimal values to test CPU usage.

    http://www.eli0s.com/Tests/FloatDT.capx

  • Using spritesheets or series of sprites "reduces" Spine to just an other animating software. The real power (as with Spriter) lays in small file size and, even more importantly, in features like animation blending. My point is that for the most part not having an importer/native plugin defeats the purpose of using these software.

  • One obvious workaround would be to make your background sprites fully opaque (you'll have to "bake" the gradient in to them) and put the sun and the moon sprites on a Layer behind the BG layer/Objects. Of Course, the way you have it now provides the opportunity to blend the the BG sprites with the BG sky color, like an atmospheric haze and you will lose that ability...

    I am also interested in ways to do masking, I am forced to believe that there isn't an easy or effective way to do it in HTML5. And yes, I've seen the blend modes template, for the love of god, I can't replicate anything useful from that.

    Masking should work like clipping layers in Photoshop or, even better, as within After Effects and have the ability to exist from object level (use a sprite to mask on other sprite(s)), to layer level (use a layer to mask other layer(s)).

  • Neither example makes use of the canvas plugin at all.

    In your last post, the first link that you mention (https://www.scirra.com/forum/is-there-a-way-to-give-a-sprite-a-trail_p557543?#p557543) has a post from Yann that use the Canvas plugin (http://dl.dropbox.com/u/23551572/C2/trail.capx).

    -EDIT-

    The more I think of it, the more I conclude that R0J0hound also meant not using the canvas plugin for the trail effect...

    So thanks anyway zenox98

  • Try Construct 3

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

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

    All of those examples basically can be summed in to two categories. The first uses a sprite as a trail and this sprite is being spawned every tick or x seconds. The second uses the canvas plugin in some way, just as in the R0J0hound's example found in page 5 in this topic.

    The first method, although very flexible, has a major disadvantage, if you have many objects that leave trails (and further more the trails are long), you have to spawn many-many sprites, so there ought to be a performance issues somewhere.

    The second method, on the other hand, does not require any number of sprites, but I renders a weird result, best viewed when the opacity values of the "fill canvas with color" action, or the object that has the destination out blend, are very low. The thing is that you'll need low opacity values if you want long trails.

    I was hopping that in his last post, R0J0hound has something in mind that uses the canvas object and he was not referring the methods that are under the "spawn sprite trails" category...

eli0s's avatar

eli0s

Member since 24 Apr, 2013

None one is following eli0s yet!

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers

Progress

13/44
How to earn trophies