dop2000's Recent Forum Activity

  • Have you tried searching this forum? There are several Google Maps addons for C2, some of them may be ported for C3.

  • Are you using any effects? Even simple effects can be very slow on mobile (at least on Android).

    There could be many other reasons why your game is slow.

    See how many collision checks are performed in debug mode. (anything under 100.000 per second should be fine).

    Check if you have any heavy events that are executed on every tick. Or maybe you are spawning too many objects and not destroying them. Also, try "Profile" tab in Debug mode.

  • Put all keys into a dictionary. Then save this dictionary in local storage.

  • You might need to use "acquire target" instead of "Add object to target".

    It's more work, but this way you have more control. So your event may look something like this:

    Every 1 second

    For each turret

    ..If turret doesn't have target

    ....Pick enemies that are in range and visible

    ......Pick nearest enemy to Turret -> Turret acquire target Enemy

  • I don't know, I'm not a psychic :)

    I have no issues running this code in NW.js

    Try pressing F12 and check console log, maybe there will be some additional information about the error. If you can't figure it out, please post the error message and a screenshot of your events or capx file.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, it's one of the system expressions.

    Just copy and paste this into "TextObject Set Text" action:

    RegexReplace(str(v), "(?<=\d)(?=(\d\d\d)+(?!\d))", "g", ",")

    v is the variable with your big number.

  • Made a level with 15 bombs to see if it's possible to beat it.

    The answer is - almost :)

  • Assuming that layer 0 is not scaled, and layer 1 is scaled, Sprite is on layer 1:

    On every tick -> Sprite set position to

    X: CanvasToLayerX(1, LayerToCanvasX(0, Mouse.X, Mouse.Y), LayerToCanvasY(0, Mouse.X, Mouse.Y))

    Y: CanvasToLayerY(1, LayerToCanvasX(0, Mouse.X, Mouse.Y), LayerToCanvasY(0, Mouse.X, Mouse.Y))

    .

    EDIT 12 days later:

    AM_Games , scrap that! I just remembered that you can easily get mouse coordinates for any layer.

    Simply set position to Mouse.X("layername"), Mouse.Y("layername")

  • You can break the string into tokens and re-assemble again:

    variable newPrizes=""
    For x=0 to (tokencount(Prizes, ",")-1)
     if loopindex=4 : Set newPrizes to newPrizes & "9"
     else : Set newPrizes to newPrizes & tokenat(Prizes, loopindex, ",")
    
    
     // add comma after each token, if not the last one
     if loopindex<>(tokencount(Prizes, ",")-1) : Set newPrizes to newPrizes & ", "
    
  • You can do this with regex:

    Set v to 123456789
    MyText set text to RegexReplace(str(v), "(?<=\d)(?=(\d\d\d)+(?!\d))", "g", ",")
    

    result: 123,456,789

  • You can also try this method:

    1. Convert object coordinates from layer 1 to layer 2

    Sprite set position to
    X: CanvasToLayerX("Layer 2",LayerToCanvasX("Layer 1", sprite.X, sprite.Y) ,LayerToCanvasY("Layer 1", sprite.X, sprite.Y))
    
    Y: CanvasToLayerY("Layer 2",LayerToCanvasX("Layer 1", sprite.X, sprite.Y) ,LayerToCanvasY("Layer 1", sprite.X, sprite.Y))
    

    2. Transfer object to layer 2 and then move it towards the basket, using Bullet or some other behavior:

    Sprite move to Layer "Layer 2"
    Sprite set Bullet enabled
    Sprite set Bullet angle of motion to angle(self.x, self.y, basket.x, basket.y)
    
  • Resizing text objects dynamically is surprisingly difficult.

    You need to make the text field big enough to fit the entire text, then set text. Then wait a little for the system to render it, measure the text using TextWidth and TextHeight expressions. And only then you can resize the text object.

    It's probably better to do the rendering/measuring with a different (hidden from the player) text object. See this post for some examples:

    construct.net/forum/construct-2/how-do-i-18/creating-appropriate-sized-spe-128993

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 279 followers

Connect with dop2000

Trophy Case

  • 10-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
  • x5
    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
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

30/44
How to earn trophies