AllanR's Recent Forum Activity

  • haopl

    I would use the Fade behavior. Create all the brick_stop objects in the loop the way you have it, but replace the Wait action with setting the "fade in time" property. (obviously, set the fade out time to 0).

    Another way to do it would be to set a global flag that would trigger creating one row of bricks every x seconds, until the board is full.

  • since the random range is 1 to 5 and then rounded, you will get the following results:

    1 to 1.49 = 1

    1.5 to 2.49 = 2

    2.5 to 3.49 = 3

    3.5 to 4.49 = 4

    4.5 to 5 = 5

    so, 1 and 5 have half the chance to be picked as 2, 3 and 4

    you should use: choose(1,2,3,4,5)

    or use floor or ceil to make sure everything is rounded the same way to make the chances equal.

  • neku

    300 is a lot of animations for one object, and could cause memory issues because all those animations would be loaded available all the time.

    if you only need certain sets of animations available for certain levels you might want to group the animations needed by the levels they are need on. Or have some base animations and pin accessories on top to minimize the number of animations you need.

    You might want to look at Spriter. it allows you to create basic animations and then use character maps to build up all the different combinations you need - and would be a lot easier to manage!

  • neku

    there are lots of ways to do it... you could make the player sprite have different animations for the different looks. Then you just have to change the animation.

    or you can have an invisible player sprite that has all the behavoirs and then pin what ever sprite you want on top of that.

  • KacperStasieluk

    the trick to get from a position on one layer to same place on a different layer is to use LayertoCanvas from the source layer and then take those canvas coordinates and plug them into CanvastoLayer on the destination layer.

    I made a quick sample to show you (based on that tutorial you linked to).

    I made the mask layer have the same parallax settings as the Game layer, so the glow object can just be pinned to a light source on the game layer. But any light source on a layer with different parallax settings needs to manually set the glow position using the layer to canvas - canvas to layer method.

    so, in my sample there are two torches on the game layer and some fireflies, and the player has a very dim light too. Then there is a torch on the layer behind that (with 50% parallax), and a moon on the back layer with 0% parallax.

    https://www.rieperts.com/games/forum/LightMask.capx

  • Dayvid86

    from the manual for the sprite object:

    Load image from URL

    Load an image from a given URL. The current animation frame will be replaced with the image. It is not shown until the image has finished downloading, and On image URL loaded triggers. Images loaded from different domains are subject to the same cross-domain restrictions as AJAX requests - for more information see the section on cross-domain in the AJAX object. Data URIs can also be passed as an image, e.g. from a canvas snapshot or webcam image. The Size parameter sets whether the Sprite object will be set to the image size when it loads, or whether to keep its current size and stretch the image.

  • ChesVCF - have you looked at the "Audio Analyser" sample on the Advanced Examples tab of Construct3?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was able to download the plugin and the example file a few minutes ago from the links in the first post of the thread. and it works just fine.

    the example doesn't even have the Local Storage plugin in it, so that is not how you use it. The TimeAwayL plugin directly accesses local storage for you. you also don't want to pause the timer while your program is running and then try to start it manually when the program suspends or is closed down. Just use "Get or Start timer" at the start of the layout and just leave it run forever.

    the "timer" is just a time stamp. Nothing actually happens until you check the elapsed time (it just calculates the difference between the initial time stamp and now).

    Construct2 can't do push notifications, but I think there are plugins and 3rd party services that can do that.

  • Gadgetkk

    you could also use Bullet behavior (set the speed fairly low and gravity high) or physics...

  • Lernox

    Construct can't tell the difference between the left and right shift/ctrl keys, so you have to use javascript to add an even listener (and this might not work the same on all browsers). You can have javascript call a Construct function, passing in which one was pressed.

    It gets tricky when you want to hold down the shift keys, because then you also have to watch for keyup events as well as the keydown event.

    on my keyboard, Chrome and Firefox seem to have a bug when you press both shift keys at the same time. Only one of the keyup events fires. This doesn't happen for the CTRL keys, and it doesn't happen in Edge...

    you can get my sample here: https://www.rieperts.com/games/forum/LeftRightShift.capx

  • locohost

    the problem is that Construct 2 and 3 doesn't finish creating an object until immediately after the event where it is created.

    So, you have to wait until the next top level event before you can "pick" the object (because by then construct has added the object into its internal list of objects - making it pickable).

    there is nothing wrong with using functions as long as you understand that it is extending the event where the function is called from.

    that means if you have an event that calls a function that creates an object, and that function calls another function, or you call a second function from the original event, construct executes all those actions as part of that first event, and doesn't finish creating any new objects until the event is completely finished.

    The objects are automatically picked when you create them - the only way you can access the object from within a function call (within the same top level event as where it was craeted) is to pick the object by its UID. So you can pass the UID of the object to a function and use the UID to pick the object and work with it that way.

    The only other option I know of is to add a "Wait 0 seconds" before adding additional actions/function calls. What that does is wait until the end of the current tick to execute those actions - which counts as a new top level event, and at that point the objects can be picked.

    so, forget the wait for signal, try adding a "wait 0 seconds" before you call the second function.

  • pcgun007

    use the Drawing Canvas's "Paste Object" action, which is in the "Drawing: general" section.

    then you have to "Save image" which will trigger an event when the image is ready. My sample just downloads the image, but that is where you would send it to facebook...

    https://www.rieperts.com/games/forum/save_image.c3p

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies