dop2000's Recent Forum Activity

  • The image in your sprite should be facing right (at 0 degrees).

    Also angle(x1, y1, x2, y2) and angle(x2, y2, x1, y1) are not the same thing!

  • You can use lots of sprite instances, or you can use one tilemap. It depends on what you need to do with these cells.

    With both methods you should be able to detect which cell was clicked.

  • Try Pathfinding behavior.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It would really help if you share your capx file.

    "NaN" could happen if at some point you are dividing by 0 (which is not allowed)

    I have a zoom demo, but it's not quite what you want, as it zooms to screen center, but maybe you could modify it:

    (test in Chrome)

  • Check this demo:

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

    Left-click a car, then right-click the spot where it should drive.

  • Well, you can probably define 4 tilemaps like that on each intersection (for cars coming from each of 4 directions).

    When a car approaches the intersection, check which of the tilemaps it is not overlapping and use this tilemap for pathfinding for this car.

  • Here is one way:

    Make an invisible tilemap (green area) as on this picture:

    Tilemap should not be solid.

    For Car in pathfinding properties set Obstacles:Custom and in evens add that green tilemap as an obstacle.

    But if you have lots of cars moving in different directions, this trick will not work.

    You might need to use some other method instead of pathfinding.

  • I don't understand your question. Why do you need quotes?

    Your source string is this:

    sourceString= "Lorem ipsum dolor sit amet.&newline&Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.&newline&Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.&newline&Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

    You do

    set targetString to replace(sourceString, "&newline&", newline)

    And when you display targetString on the screen, there should be line breaks where needed.

  • Yeah, one way is to cut out all these hundreds of provinces and save them as individual sprites, or frames in one sprite.

    Or you can use Canvas plugin to fill individual provinces with color (like a Bucket tool in any image editor).

    But you'll still need some kind of list/index with coordinates of each province. Maybe make a simple capx where you click at the center of each province on the map and it saves click position into an array. Then export this array as JSON and import into your game.

  • See my second comment.

    When you are using "Array for each element", Array.CurX will contain the index of current element in the arry.

  • If you need to find a part of the string in array, instead of "Array compare current value" condition use this:

    System -> Compare two values -> find(Array.CurValue, searchString) greater or equal 0

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 262 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
  • 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
  • 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