brunopalermo's Forum Posts

  • Here. Using Webstorage to make it persistent.

    [attachment=0:12smvpf5][/attachment:12smvpf5]

    This example only shows the textbox layout if name is not stored. You can reset the storage and refresh the page if you want to go back to the textbox layout.

  • Unnatural20 This approach is very similar to my version 2. But, for what wants, it won't work as a "single-event version", because you can't put a time loop inside a function. Both approaches would be single-event for a single-use situation as the one you've posted.

  • Just get the text in the textbox and set a variable (say playerName) to it. Whenever you want the player's name to show use this variable. If you want it to persist between sessions, use a Webstorage object.

  • hsm4ever

    As NicotineLL mentioned, you may just check the animation playing and set the base damage accordingly. For the critical, you can have a damageMultiplier on your damage calculations, which is set to 1 all the time, but set to 2 (or 3 or whatever you want) when you get a critical.

    Here's a very simple example, just so you get the gist of it:

    [attachment=0:1d0vii8s][/attachment:1d0vii8s]

    Click the buttons to change the animation. The chance of a critical is very high (10%) just to allow you to see it happen.

  • Note that the index of the touch is related to simultaneous touches. That is, if I touch with 3 fingers they'd be 0, 1 and 2, according to the order of touch. If I touch with one finger again and again all those touches would be index 0.

    Also, "Has Nth Touch" doesn't work as you think it does. This condition is true if that specific touch index is active.

    For example, having these two events:

    On touched <object>

    Has touch 3

    means that this is only true if the object is touched AND there are 4 touches active on the screen (0,1,2,3).

    What you wish, I believe, is:

    On touch 0 start

    Is touching <object>

    Which means that it's true only for the first touch (no multitouches) and if this touch is touching that specific object.

  • Unless it's necessary due to other aspects of your game, I wouldn't use the Physics behavior... Bullet behavior can do that and, as far as I understand, it goes lighter on your processing...

    Check this example:

    [attachment=0:sxd064ne][/attachment:sxd064ne]

    Hope it helps!

  • Use a 2 seconds timer. Start the timer once when the button is touched and deactivate the button. Set an On Timer event to reactivate the button.

    Here's an example:

    [attachment=0:zn8apn4q][/attachment:zn8apn4q]

  • Never played it. Could you elaborate on that or show a video?

  • One last thing... I noticed you wanted the enemies to take different amounts of damage. Instead, you could have the damage fixed and vary the enemy's HP.

    Thus, instead of the bullet causing 2 to the Flyer and 8 to the Shooter, make the Flyer HP 4 times the Shooter's. You'll have the same effect.

    Or you could have the damage taken as an Enemy variable. Whatever works for you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Because you add 1 every loop iteration. The loop has 10 of those iterations every second, thus, every second it adds 1 to the the variable 10 times. That's why it goes in increments of 10.

  • Here...

    [attachment=0:2yovkcje][/attachment:2yovkcje]

    Whenever the player collides with any member of the Enemy family you are damaging all FlyerEnemy and Shooter instances.

    Use: Enemy subtract X from Health

  • I loved the character and the animations (specially the jump).

  • Just share it here and we all might help... Seriously, nobody is going to steal other people's projects around here... And ideas are overrated anyway.

  • r2cvv There's nothing wrong with the piece of code you've shown... I'd guess the error is somewhere else in the code. Care to share the capx?

  • Did the dt change for the Bg work fine, Dliu3d?