dop2000's Forum Posts

  • You are doing something wrong. Please share you project file (.capx)

  • Check collision polygons on both the block and your character sprite (in all animations).

    For platformer game it's best to use a simple invisible rectangular sprite with Platform behavior, and pin your character to it. It can help to avoid many problems related to collision polygons.

  • Did you disable both collisions and Platform behavior?

    If this doesn't work, then don't disable anything and use my second solution from the comment above - ignore collision with bullet if Dead animation is already playing.

  • You forgot to move the coin to BG layer. And this will only work if your Coin and CoinCount are on layers with different parallax setting.

  • No, On Load Complete is triggered when you load a saved game.

    You can add a global variable "EffectIsShown". Check if EffectIsShown=0 and run that effect, after that set it to 1.

    The only problem with this method is that if you are resetting global variables when the game is restarted, this variable will be reset too. To avoid this, you can use local static variable, or an instance variable on some global object.

  • Is the Coin-Counter-Sprite located on a separate layer with 0 parallax?

    You will need to move the coin to that layer (using "Move to layer" action), adjust its position and then enable Bullet.

    Converting coordinates between layers with different parallax is a bit complicated.

    Say, if you need to move the coin from layer "Main" to layer "HUD":

    Set newX=CanvasToLayerX("HUD", LayerToCanvasX("Main", Coin.X, Coin.Y), LayerToCanvasY("Main", Coin.X, Coin.Y))

    Set newY=CanvasToLayerY("HUD", LayerToCanvasX("Main", Coin.X, Coin.Y), LayerToCanvasY("Main", Coin.X, Coin.Y))

    Coin move to layer "HUD"

    Coin set position to (newX, newY)

  • What's wrong with Bullet behavior? Disable "Set angle" in Bullet properties, set angle of motion to angle(coin.x, coin.y, destination.x, destination.y) and it should work.

    If you want a nicer looking movement with acceleration/deceleration, I recommend LiteTween or MoveTo addons:

  • You can use Keyboard.StringFromKeyCode expression. Code for A is 65, code for Z is 90.

    Or create a string variable with all letters and use mid()

    alphabet="abcdefgh...."

    to get 5th letter: mid(alphabet, 4, 1)

  • Man, your game has seriously cool graphics! Great job!

  • Holiday, I actually found that capx here on the forum.

    Thanks, R0J0hound !

    You example does work a bit faster. I have an old Android mobile phone that I use for performance testing and it's showing 45-50 fps. (about 10 fps more than with particles)

    Unfortunately, the Subtract effect is still quite slow on mobile. When I add two big gradients like that into my game, fps drops from 50-60 to 20-30...

    So I think I'll have to use particles, but lower quality.

    If I make the image smaller, significantly reduce the rate and fade out time and move them closer to the borders of the screen, the fog looks good enough and only costs 2-3 fps.

  • Wow, you must have spent a lot of time on those animations!

    I made quite a few changes, have a look:

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

  • System -> For each (ordered) , object: Sprite, order by: random(1)
       Sprite set animation frame to: loopindex
    [/code:1t3be6dm]
    
    Also make sure to set animation speed to 0.
  • x=0.666666666

    Set text to int(x*10)/10

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • angle(Player(0).x, Player(0).y, Player(1).x, Player(1).y)

    Or you add two temporary variables tempX, tempY, pick the first Player instance, set tempX=Player.X, tempY=Player.Y

    Then pick the second player instance and use angle(tempX, TempY, Player.x,Player.y)

    Or you can create a family with Player object, then you'll be able to pick Player and PlayerFamily in the same event and do angle(Player.x,Player.y, PlayerFamily.x, PlayerFamily.y)