dop2000's Forum Posts

  • Here is how you can do this in one action:

    Set FlipGravity to (FlipGravity=0)

  • I found a few posts that could help:

    Edit: this is how you convert coordinates from layer 1 to layer 0 (when sprite located on layer1):

    CanvasToLayerX("Layer 0",LayerToCanvasX("Layer 1", sprite.X, sprite.Y) ,LayerToCanvasY("Layer 1", sprite.X, sprite.Y))

    CanvasToLayerY("Layer 0",LayerToCanvasX("Layer 1", sprite.X, sprite.Y) ,LayerToCanvasY("Layer 1", sprite.X, sprite.Y))

    For example, to fire a bullet from gun on layer 2 at player on layer 1:

    Create object Bullet on layer 1,

    set X to CanvasToLayerX(1, LayerToCanvasX(2, Gun.X, Gun.Y), LayerToCanvasY(2, Gun.X, Gun.Y))

    set Y to CanvasToLayerY(1, LayerToCanvasX(2, Gun.X, Gun.Y), LayerToCanvasY(2, Gun.X, Gun.Y))

    Set Bullet angle of motion to angle(bullet.X, bullet.Y, Player.X, Player.Y)

  • There are only a few expressions in C2 related to scrolling - ScrollX, ScrollY, LayerParallaxX and LayerParallaxY.

    And, as far as I know, there is no such thing as scroll rate.

    I'm not sure how any of those can be related to "overlapping on offset" (there is no "collision at offset" either).

    Are the objects that you need to check for overlapping located on layers with different parallax setting?

  • I'm not a big fan of arrays in C2. I repeat this almost in every post where arrays are mentioned <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    I'm convinced that many things can be done much easier with objects and instance variables instead of arrays.

    Anyway, here is a demo where cards are moved like you want. I used an example from your other post, modified and simplified it (by removing arrays <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> )

    https://www.dropbox.com/s/b7qmdni2wn9ze ... .capx?dl=0

    You will need MoveTo addon to open it. It's a great behavior and I highly recommend installing it.

    If you change "order by" to spCard.cardFace in event 10, then cards in hand will be arranged by their suit and value.

  • Yes.

  • If you rotate 90 degrees, check LoS and rotate back (all in one event), this will not interfere with any other LoS checks.

  • Animations, many system events and behaviors are automatically adjusting their speed to fps, they are already using dt for this.

    Same animation on 60fps and 30fps PCs should take the same time (ideally), "Every 1 second" event should take 1 second, bullet with speed 1000 will cover 1000px etc.

    If your second PC is so slow and laggy that C2 engine can't compensate it, then you will not be able to do this with dt either.

    Normally you only need to use dt when you are controlling objects with events, like moving a sprite every x pixels every tick, or scaling/scrolling the view.

    Edit: I did some testing, looks like dt can't be bigger than 0.0333. So if fps is below 30, the dt will still be 0.0333 and the game will run slow. You can't fix this with dt, because the actual frame duration is longer than 0.033

    Maybe you can do this by getting system time with JS or some addon..

    I have a powerful ultrabook with Windows 10 which I'm only using for about a month.

    C2 was working fine at first, but seems like it's getting slower and slower with each day. It sometimes takes about a minute to load, all dialogs are opening 1-2 seconds, interface elements are redrawing painfully slowly. And I'm not talking about big projects, it works like that even with blank projects. I don't know if windows updates are causing this or something else, but it's pretty annoying...

    And, like many others mentioned, there are no such issues on my two older laptops running Windows 8 and Windows 7.

  • CMuskett

    This is most probably caused by collision polygons or origin points.

    Use a different invisible sprite with Platform behavior and pin your character to it. There was a similar post just 2 days ago:

  • You can simply rotate your object with LoS 90 or 180 degrees, check LoS, then rotate back, all in one tick.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So UID is in Y0?

    When you set value at axis X in 2D-array, you actually set it at 0 index on Y axis.

    So "Set value at (X=2) to 99" is the same as "Set value at (X=2, Y=0) to 99"

    Have you tried my demo capx? It does exactly what you want.

    And also consider doing this without the array. Since you are dealing with instances and UIDs, you should be able do all this easier if you use instance variables.

  • When speed=0, there is no motion, that's why "Set angle of motion" has no effect.

    You can wait till the object gain some speed, or add an action "Set bullet speed to 0.01" before setting angle of motion.

  • Oh, sorry, I didn't know they changed it in C3.

  • All Rex's addons are here:

    https://c2rexplugins.weebly.com/map.html

    And I think 'PlayLive' is this guy:

    https://www.scirra.com/users/nandynho

    You can ask him or search his posts.