UberDark's Recent Forum Activity

  • I hope this makes it more clear for you..

    https://dl.dropboxusercontent.com/u/1750576/chooseexample.capx

  • You can read about both these expressions here..

    https://www.scirra.com/manual/126/system-expressions

  • If you are just wanting it to pick a between a couple choices you can use:

    choose(a, b)

    This will select one of the two..

    So could also be numbers like;

    choose(1, 2)

    for example.

    You can add as many choices as you want.

    choose(a, b, c, d, 2, 4, 15, pizza)

    The 'random' function is used for picking a random number between two numbers..

    You should use choose instead i think/

  • stymphalian

    Sorry i didn't see your message earlier. Just got home. Got it working now though?

    Setting a variable to the first item in the array would be system > set variable > arrayname.At(0, 0)

    This is assuming you have a 2D array..

  • Works like a charm!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So LittleStain pointed out to me in PM that my problem is i am moving the map but not the layer when i use drag and drop. This cause the coordinates to mess up. Solution would be to store the markers position in relation to the map (offset) and when they are loaded offset them to the same spot.

    Very insightfull and helpfull thank you.

    Going to give that a go now

  • Aw i had to read it myself but it says this:

    1. Loader layouts are not shown when publishing as native apps on mobile (e.g. via PhoneGap, CocoonJS and appMobi). This is because the entire application is downloaded at once. Since all files are immediately available, nothing needs to be downloaded. For these platforms you probably want to focus on a custom splash image instead.

    Sorry i didn't notice that.

  • Paralax of both layers is set to 100, 100.

    Or are you saying there is a paralax difference always regardless of the settings?

    And when the map is fully zoomed out it automatically centers btw..

  • The map and markers are at different layers but they zoom (scale) the same.

    When you send coordinates without CanvasToLayer, those are relative to the viewport though (the canvas object).

    And yes i tried the zooming quickly trick.

    I also tried putting an object on the top (not scaled) layer exactly over the place where i put the marker and using that coordinates. Again no luck. Not sure why those last two options did not work though for it seems to be flawless logic.

  • But that would send the coordinates of where it appears on the screen at that time. Not where it would be when the map is zoomed out.

    So i tried to quickly zoom out to scale 1 and then send it but that still seems to leave it buggered.

    Tried so many things on this..

    I can show you the capx but it is quite a cluttered project. And i also don't really want to send it to everyone..

  • Retrieve it all in one query and use a seperator in between every bit of data. You set that in the php script. As an example i will use "|" as a seperator.

    The line in php would look something like this:

    echo $row["index1"] . "|" . $row["name1"] . "|" . $row["index2"] . "|" . $row["name2"] . "|" ;

    Then in Construct2 you use: system > set variable > (tokencount(AJAX.LastData, "|")

    This will count the pieces of data seperated of by the "|"

    Then just set the size of the array with that variable.

  • I noticed that too. I thought it had to do with the image point or origin of the image but when i tried that it didn't help. Perhaps try 'overlap at an offset' instead of 'on collision'? I don't know really.

UberDark's avatar

UberDark

Member since 14 Jan, 2012

None one is following UberDark yet!

Connect with UberDark

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies