LittleStain's Forum Posts

  • Did you forget to put the UI layers paralax to 0,0 in the second layout?

  • I'm not really sure what kind of example..

    on one layout set global variable

    on other layout add a condition checking the global variable

    so something like

    normally variable coinmultiplier = 1

    on the menu layout:

    on button pressed

    set variable to 2

    on the game layout

    on collision with coin

    add coinmultiplier*10 to coins

  • Well you can't do anything with the information, before you have it, so there will always be this (very small) waiting time..

    Best way to do anything about it would be to only show the stuff that is being affected after it is affected..

    for example a (fast) fade-in could look cool, without the user having the idea it was to disguise something..

  • First of all I guess you dont want to spawn every tick the space-key is down..

    So on space pressed would probably be better..

    Second.. Unpinning after destroying isn't really nescessary..

    Third on pressed triggers once setting it to 180

    But on released triggers immediately when released, so you might not even see..

    Not sure what event you use for mirriring/rotating your character, but why not use that event to mirror/rotate your breath/flame as well?

  • You mean the time between the start of layout and the time the localstorage item is loaded?

  • You are not picking an instance of cabecas..

  • Try Construct 3

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

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

    float f = 10.123456F;

    float fc = (float)Math.Round(f * 100f) / 100f;

    Double

    Double d = 100.123456;

    Double dc = Math.Round((Double)d, 2);

    Decimal

    decimal d = 100.123456M;

    decimal dc = Math.Round(d, 2);

    Source : Jeery

    Any reason for this reaction in this thread?

    These aren't Construct2 expressions, so I'm just curious..

  • Haha, I don't even remember making this one..

    It's not very good, actually..

    Which part of the events don't you understand?

  • LittleStain I tried to change the size for one larger, but nothing happens. When I test the game the size is still the same. I need to set the monsters from far away, so I can place many of them.

    What do you mean by "change the size for one larger" ?

  • You could use the "on collision" - event..

  • Instead of focusing on lerp..

    What is the actual effect you want?

    Could it be achieved by giving a sprite any of the movement behaviours?

  • When you create a variable, you can set it's value inside the editor.

    You could also create an action to set the variable.

    I don't know which conditions you need for your event so I'd have to guess..

    something like:

    on timer

    (subevent)

    if nextspawn = 1

    create enemy1

    if nextspawn = 2

    create enemy 2

    (empty)

    set nextspawn to int(tokenat(textvariable,0,";")

    -set textvariable to right(textvariable,2*tokencount(textvariable)-1)

    -start timer for random(1,4)

  • When working with a plugin, how easy it is to get data\results from javascript into C2 and vice-versa?

    my main needs from JS is for networking with server, i.e: passing\receiving messages and delegate results into C2.

    Will it be easier in C3? When C3 will be available?

    Wouldn't using the Ajax-object work for you?

  • You have absolutely no events that run every tick, or just no events where you use the condition system every tick?

    Not that that would normally interfere, unless one of them has actions attached that conflict with the dragging..

    Does the sprite you are dragging have any (other) movement behaviours attached, or are there events with actions setting it's position that could be conflicting/interfering?

    Using multiple event-sheets and/or many events shouldn't have effect..

    I guess the only reason the VM would have any effect is if it's somehow reducing framerate, or hasn't got enough memory/cpu/gpu assigned..

    Did you check your framerate and (image) memory usage and cpu usage (using the debugger)?

  • > Pinning should do the trick..

    > Could it be you are pinning every tick instead of once?

    >

    > Without seeing your events/capx the question is hard to answer..

    >

    Even dragging just 1 sprite around on the screen (nothing pinned) lags behind the mouse cursor. Even in the NW.js export. A little better in the export, but still noticeable. I have a modern laptop (i7 4810, 16GB RAM) too so I think it's just an inherent performance issue with JavaScript games. I don't think there is a solution other than using another tool and building a native app.

    I'm doing what I can to minimize the visual performance things. I think it will be Ok.

    Question: Is there any way to completely turn off Physics in the whole game? I don't need any.

    If you haven't added the physics behaviour, it isn't present..

    I've never really noticed a lag while dragging anything other than DOM elements..

    Could it be something else is interfering with the behaviour?