dop2000's Recent Forum Activity

  • 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.

  • newt

    If I understand your method correctly, it will distribute sprites in 10px intervals. I don't want this.

    See my picture above - one sprite may be at x=8, another at x=21 etc.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nice work, mate! That was really fun!

    Would love to play the full game.

    Is there any way I can interact with the ladies?

  • Hey guys!

    I'm looking for an algorithm to randomly distribute sprites on the line.

    Let's say the line length is 100 px, and each sprite is 10 px wide.

    Number of sprites can be different, from 1 to 8.

    Sprites can touch, but not overlap.

    It's not a problem to distribute 4 sprites, but with 5 or more it's possible to run out of free space if I just place them randomly.

    Seems like an easy task, but I can't figure it out.

  • Try this:

    Add a special character to each letter in the string that you want to be yellow:

    myText="Hello, ^J^o^h^n! How are you?"

    Then parse this string character-by-character and when you find "^", read next letter and wrap it into {color} tag:

    H
    e 
    l
    l
    o
    ,
    
    J[/color]
    o[/color]
    h[/color]
    n[/color]
    etc.[/code:cpf80vsm]
    
    [quote:cpf80vsm]is there any way to change the plugin of my texts
    
    If you need to replace lots of text objects, you can edit XML files of the project, as described [url=https://www.scirra.com/forum/viewtopic.php?f=147&t=196534]here[/url], but it's not recommended.
  • Line of sight is just a condition. You can simply choose not to use it in an event.

    Or you can do something like this:

    As for the range, there is an action "Line of sight Set range", or you can compare distance between objects:

    System->Compare two values-> Distance(enemy.x, enemy.y, player.x, player.y)<=MaximumRangeToFire

dop2000's avatar

dop2000

Online Now

Member since 26 May, 2016
Last online 24 Nov, 2024

Twitter
dop2000 has 247 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x4
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies