dop2000's Forum Posts

  • You do not have permission to view this post

  • You can also try Tween with different easing options.

    Every time the health changes (increases or decreases), restart the tween for healthbar width. End value: maxWidth*(currentHealth/maxHealth)

  • HP is drained in the first event, 4 points at a time. In your game you'll of course have a different event for this.

    The expression for health bar width explained:

    lerp(Self.Width, 300*(hp/60), dt*2)

    Self.Width is the current width. 300 is the initial width (at full health). 60 is the maximum (full) health value. dt*2 is how fast the bar will react to health changes.

  • I made this for another post:

    dropbox.com/s/tjowni4xr1fgkc9/Healthbar.c3p

  • You are creating 4 instances of Sprite2 at the same time. How Sprite is supposed to find path to all four of them?

    One pathfinding instance can have only one active path. If you tell it to find another path, the previous path will be lost.

    Also, Find Path is an asynchronous action. Depending on the map size and other things, it may take different amount of time to find path for different objects. That's why you see only two "a" in the text. On a slower machine or on a larger map it will be just one "a".

  • You do not have permission to view this post

  • You can use PlatformInfo.ScreenWidth and PlatformInfo.ScreenHeight expressions to estimate the size of the physical screen, and then resize your virtual pad accordingly.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Actually, seems like you need to increase gravity for faster falling. Try this:

    Platform is falling -> Set gravity to 2000
    Else -> Set gravity to 300
    
  • If you need only the top of these 100 objects to be clicked, the best solution is to add them all to a family and then do "On Family clicked, Pick top instance".

  • Add a second (inverted) condition -

    On Object Sprite2 touched
    AND Touch is not touching Sprite1 - Sprite2 Subtract 1 point
    

    Or, if you are using Mouse -

    On Object Sprite2 click
    AND Cursor is not over Sprite1 - Sprite2 Subtract 1 point
    
  • Why do you need another behavior? It's rarely a good idea to use Platform with other movement behaviors.

    You can do this:

    Is Touching -> Accelerate 1000 at angle -90
    Else -> Accelerate 500 at angle 90
    
  • You do not have permission to view this post

  • I think any movement is limited by Max Speed value. So if you need a faster fall speed, you will have to change Max Speed with an event when your character starts falling.