dop2000's Forum Posts

  • It depends on how realistic you want this to be.

    You can try Bullet behavior:

    On each collision with the water increase bullet gravity.

    After 2-3 collisions disable Bullet.

  • Yeah, this will work too, thanks.

  • If you have old version of Construct 2, you can do this:

    Unzip CAPX file into a folder.

    Then open .caproj file in Notepad and edit this line:

        <saved-with-version>24600</saved-with-version>
    
    change to your version, for example :
        <saved-with-version>24400</saved-with-version>
    [/code:y97j1txw]
  • Sorry if this a silly question, I'm new to physics.

    I need to be able to put two square physics boxes on top of each other, but they keep shaking and sliding.

    Debug mode shows that even when one box is lying on the floor, it never goes into Sleeping mode, its velocity is constantly changing a little.

    This happens when either the box or the floor has Elasticity>0.

    But I want boxes to bounce when dropped, so I need elasticity.

    Is there any way to fix this?

    CAPX

  • You only need the .capx

    Just open it in C2.

  • It's not complicated, here:

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

  • Nice, thank you!

  • This may be easier to understand:

    myText="Hello, %John%! How are you?"     <-  use % to mark start and end of yellow text.
    
    letter=""
    
    textYellow=0    <-  textYellow=0 means black text, textYellow=1 means yellow text
    
    For i=0 to len(myText)-1
      Wait 0.5*loopindex seconds
      letter=mid(myText, loopindex, 1)
      If letter="%"     
                If textYellow=0  Set textYellow=1    <- next letters will be yellow
                Else Set textYellow=0                   <- next letters will be black
      Else
           If textYellow=0  bbt_dialogue_texte Append letter
           If textYellow=1  bbt_dialogue_texte Append ""&letter&"[/color]"[/code:16o5kby7]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • See my updated comment above.

  • I'm not sure I understand you.

    When you need to display next letter of the dialog and that letter should be yellow, add this:

    ""&letter&"[/color]"[/code:2dcx5z5p]
    
    Your code could be something like this:
    
    [code:2dcx5z5p]
    myText="Hello, %John%! How are you?"     <-   Put symbol % before and after the text you want to display in yellow
    textYellow=0  
    letter=""
    
    For i=0 to len(myText)-1
      Wait 0.5*loopindex seconds
      letter=mid(myText, loopindex, 1)
      If letter="%" set textYellow=(textYellow=0)    <- this will invert textYellow variable, 0 becomes 1, 1 becomes 0
      Else 
         If textYellow=0  dialogText append letter
         If textYellow=1  dialogText append ""&letter&"[/color]"
    [/code:2dcx5z5p]
  • oosyrag, Your solution is so simple and obvious, why didn't I think of it!

    Meteor's collision polygon should be very small for it to work correctly, but still it's a great idea.

    I already made a version with tilemap, so here it is..

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

  • Thanks, R0J0hound! You rock again!

    Your method works. Although sprites tend to group more towards the right end of the line, but this actually is even better for my game.

  • It's hard to tell without seeing your capx.

    There may be something in your code, or maybe some object is missing on the level layout.

  • R0j0 made something similar in this post:

    Maybe you could use this concept in your game - "fill" planets with invisible tilemaps, with tile size something like 4x4 px. And use them for collision detection?

  • Thanks, oosyrag

    Unfortunately, most of the dropbox links in that post are dead and the one that's working is not very good. It uses "brute force" method - creates sprites at random positions and then destroys sprites that overlap.