LittleStain's Forum Posts

  • You do know every x seconds is counted from the start of the game and not from the moment the condition becomes true?

    it would probably be better to use wait or timer behaviour to accomplish this..

  • LittleStain - Local variables are indeed shown only when they are within their scope but what I am trying to tell you that all the other global variables are shown there too, besides the local variables. That does not help as the list is getting longer. This has nothing to do with how I set up my variables I dont think, only how C2 displays the lists of variables - both global and local are in the same bag when looking for local (not when looking for global), unless indeed there is something wrong with my workflow, thus I am trying to find out.

    I'm just wondering why your list is so long..

    Shouldn't be nescessary..

    Like I said, there are other ways to keep global values, which as you see now, you cou'd benefit from..

  • LittleStain Would that work though? Setting a constant limit to how zoomed out the map could go would be a bad thing for players with both large and small resolutions. To cater for all resolutions with this surely the zoomout would have to be small so those with large resolutions don't see outside the layout by zooming out too far. But then those with small resolution would not be able to zoom out so much as to make the zoom useful.

    You could set the lower and upper values based on windowwidth (resolution) or viewportwidth compared to projectsize , right?

    no reason to use a constant limit..

  • Ok, strange..

    Local variables can only be accessed in their scope, so they shouldn't show up in the dropdownbox if they aren't available..

    Sounds like the way you have set up your variables might not be the best way..

  • Would using the clamp() expression work?

    That way you can give a minimum and maximum value..

  • LittleStain

    Well as I have so many variables already the best solution would be to use and and or block like I stated above. It would be ten times faster than adding another variable and looking for it, and yet making the variable list even longer, which would make searching for other variables down the line even longer because of the one additional variable.

    I know there are other ways around, like I had written but adding variables quickly stops being a good alternative as the lists get longer.

    I am talking about local variables, not global..

    There is usually no reason to have a very long list of global variables, because most of them can be local variables or instance variables or array-values or dictionary-object values..

  • Should be no problem using a sprite with the platform behaviour and pinning your sprite to it..

  • I guess using a local variable for this is the easiest, like in this thread:

  • Ofcourse you should set animation idle playing if keyboardinput is 5..

    You could add an is animation idle2 not playing condition to that event..

    I guess then you wouldn't even need the on animation idle2 ended event..

  • Without knowing how your events are set up regarding animation I can't really give any advice..

    This should work perfectly if everything is set up correctly..

    In my example you should play the animations based on the instance variable keyboardinput, or (maybe easier) the name derived from the dictionary..

  • What are the conditions for your while?

    Seems like they are never true and as such you've created an endless loop..

  • Why set the collisions disabled?

    The way you explain it the collisions happen because of the solid behaviour..

    If that is true, setting the solid behaviour disabled should do the trck..

    Also, if they are moving (without movement no collisions) you could just set the movement to true only when near enough..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Every "real" light is fake in a game..

    All of it is graphic effects and you decide which one you use..

    You could either make the graphics in an image creation program, or use things like blendmodes and/or webgl effects to get the result you want..

    There are multiple ways to get the job done..

    It's up to you to find the one that suits you and your project..

    If your lights are static, going for the image creation is usually the best option, dynamic lighting requires a lot more planning and choices..

  • C2 has the shadowlight object, but if that doesn't work for you there are always the old ways of faking it..

    What exactly is the effect you are aiming for?

  • I don't see why this would give any issues..

    keyboardinput = 5

    every random(a,b) seconds

    trigger once

    • play animation idle 2

    on animation idle2 ended

    • play animation idle