dop2000's Forum Posts

  • Try using "Apply impulse" if you want to "kick" the ball.

    From the tutorial:

    [quote:3s8uayn2]Usually you apply a force to an object over a long period of time to cause it to accelerate in a direction. For example, gravity is a constant downwards force.

    An impulse is like a sudden impact on an object. If a ball is hit with a bat in your game, you'd apply an impulse rather than a force, for a sudden one-off strike.

  • See this comment:

    There are also a few plugins you can try, here is one:

  • You can't add an object to multiple containers. But you can create a simple event that will attach the effect sprite to each item:

    On ItemsFamily created -> ItemsFamily spawn EffectSprite
                              EffectSprite pin to ItemsFamily[/code:2vkq1xm7]
    
    And another event to destroy it:
    [code:2vkq1xm7]On ItemsFamily destroyed 
       System -> Pick EffectSprite by comparison EffectSprite.Pin.PinnedUID=ItemsFamily.UID   -> EffectSprite destroy
    [/code:2vkq1xm7]
  • Why did you include 94Mb of backups into this zip?!

    You can try something like this:

    Add an instance variable "IsLeader" to your Enemies family. Set it to "True" for one instance which will be the leader.

    When the leader is killed, destroy it and all other enemies.

    If you don't want to destroy other enemies after leader's death, set a global variable LeaderIsDead=1.

    When non-leader enemy is killed , check if LeaderIsDead=1 and destroy enemy.

    If LeaderIsDead=0, instead of destroying the enemy, set it invisible. Start "Respawn" timer.

    On Timer "Respawn" : Set Health=100, Set Visible

    Also, you have a bunch of almost identical events for enemy1, enemy2, enemy3, why don't you use Enemies family in these events?

  • There is no "splice", but you can use Array->Delete in a loop.

    For example, this will remove elements 2,3,4 from the array:

    Repeat 3 times : Array delete index 2 from axis X

  • I think what happens is your layout changes faster than values are saved to local storage.

    When level ends, you save a bunch of values to Local storage and without any delay switch layout to "Menu", where on start of layout you read the same items from local storage.

    Local Storage needs time to read/write data.

    I suggest you move all "Local storage set" to event 35 or 36 of your Level 1 event sheet.

  • You can do this:

    Variable s= "111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    1111111111111111111111111111111111111111111111111111111111111111111111111111111111111"

    Set text to left(s, 100)

    But it's better to use a loop:

    Repeat 100 times : Set s to (s & "1")

    I'm glad you guys had a talk and reached some sort of agreement.

    Meanwhile I just want to demonstrate how bad Sprite Editor performance is on my Windows 10 machine.

    It takes about 0.5s to draw toolbars, 2-4 seconds to open the little window with image points, and if I right-click on animation frame - 2-4 seconds to show the context menu. This happens even with very small sprites in small projects.

    Youtube video

    Rebooting Windows fixes this temporarily, restarting C2 doesn't.

  • So does the collision happen twice?

    You can add something like a cool-off period. If there was a collision with enemy, ignore other collisions for the next 0.5 seconds or so.

    This is not the best solution, but without a capx there is nothing else I can do.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can do something like this:

    If N>=1000 then Set Text to (round(N* 10) / 10000) & "K"

  • It only worked because you are using a third party tool (rivatuner).

  • This will format the number as "1.0000"

    variable decimal=0
    Set decimal to round((number-int(number))*10000)
    Set text "txtNumber" to -> int(number) & "." & zeropad(decimal,4)
     [/code:1lytxge9]
  • Please read the previous comment, calebbennetts explained it very well.

    All you can do is skip some frames or artificially slow down the game, but it's not the same as locking fps at 30.

  • Your link is not working.

    Here is what I meant: