ramones's Forum Posts

  • Give the bar an instance variable 'timer' = 0.

    +on collision

       -> set bar animation to "active"

       -> set bar.timer to 15.

    +bar.timer > 0

       ->set bar.timer to max(0, bar.timer - dt)

       +bar.timer = 0

          -> set bar animation to "normal"

    https://www.scirra.com/tutorials/450/timers

  • With a function maybe:

    +CONDITION
       -> UnitSprite: Set [b]TargetX[/b] to [i]Function.Call("getUnitX", Self.TargetUnitSpriteUID)[/i]
    
    +Function: On [b]"getUnitX"[/b]
    +UnitSprite: Pick by UID [b]Function.Param(0)[/b]
       -> Function: Set return value to [i]UnitSprite.X[/i]
    
  • That's the exported project - you need to upload a capx. 'File > Save as single file'.

    Make sure it's within the lines when 'parallax in editor' is set to 'no'.

  • Here's a more compact way of doing the animations (what Pakost was getting at before):

    8dirAnimAndShoot.capx (r119)

  • destroyTopCoin.capx (r120.2)

    <img src="https://dl.dropbox.com/u/8367729/construct/pics/destroyTopCoin.PNG" border="0">

  • I'm not sure what you mean. In the example it will work for any object in the Sprites family. It works like this as well:

    <img src="https://dl.dropbox.com/u/8367729/construct/pics/hideObject.PNG" border="0" />

  • Example: hideObjectFunction.capx

  • On Sprite1 Destroyed

    For each Sprite2

    Compare two values: Sprite2.Pin.PinnedUID = Sprite1.UID

    -Destroy Sprite2

  • Your title screen is set as a loader layout. You can't go on to another layout until everything is loaded. You should have the start button hidden/disabled until loading is finished or use a separate loader layout before your title screen.

    It works fine here in IE - I assume you mean the lines going up and across and spelling out 'rebound'. You might have an old broken version cached.

  • Or you could use the anchor behavior.

  • Not sure what's happening there but printing out the position of the target in the collision event shows that the fist is colliding with newly spawned targets that are up off the top of the screen. I'd say it's something to do with collision detection between objects on different layers. If you put the fist on the "Game" layer it doesn't happen.

  • You need some extra brackets in there:

    "Clicked?: "&[b]<font color=red>(</font>[/b](Sprite.Clicked=0)?"NO":"YES"[b]<font color=red>)</font>[/b]
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have a look for the nickname plugin.

  • 1. You could use 'pick top instance' in the first event

    +Touch: On touched Prey
    +Prey: Speed = 0
    +Prey: Pick top instance
    

    2. You need to loop through the prey as well:

    +System: For each Prey
    +System: For each HealthBar
    +System: Compare two values [HealthBar.Pin.PinnedUID = Prey.UID]
    
  • You can't pick dest peg because it's just been created. When you create an object then it is picked and stays picked in sub-events. But if you unpick then you can't pick it again. And if you use pick all, that will pick all the pegs except for dest peg because it's not yet pickable. I know - it's confusing. <img src="smileys/smiley36.gif" border="0" align="middle">

    physicsBridge2.capx