dop2000's Forum Posts

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

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • Not sure what you mean..

    Add event: Array For each element

    Add sub-event: Array Compare current value ... (your search string)

    Add action: Set (variable) to Array.CurX

  • Fireballs are not actually multiplying. The problem is that you cast multiple fireballs at once. You don't notice that because they are moving on top of each other and look like one sprite, but sometimes they collide with the wall at slightly different angles and separate into several sprites.

    "Caster Animation frame=15" condition lasts longer than one frame, that's why multiple fireballs are spawned.

    You need to add "System Trigger once" condition to your event #5.

    Use Debug Mode (Ctrl-F4), you'll have a much better understanding of what's going on in your game.

    Also I suggest adding "Destroy outside layout" behavior to the fireball.

    And make the same collision polygon for all fireball frames - it will make collisions more predictable and accurate.

  • You can do this:

    Array For each element

    ...Array Compare current value -> Set index to Array.CurX

  • It's easier to use replace() expression:

    Set s to "Hi there!^How are you?^Take a seat."

    Set s to replace(s, "^", newline)