UberDark's Forum Posts

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

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

  • Try Construct 3

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

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

  • Anybody got a clue?

  • Maybe test this by putting a textfield in every layout and set it to textfield>set text>HELP so you can see if it actually changes the variable to 1 or not?

  • I just read this in the manual which (to me anyway) suggests that they stay active once initiated even when you load a new event sheet..

    [quote:5xe5kid7]

    Global variables store their values between layouts. Events in any layout can access any global variable, even if it was created in a different event sheet that is not included.

    https://www.scirra.com/manual/83/variables

  • Like zenox98 says that is not enough information but from what i read in your description the level is only checked on monster spawn so the existing monster is not affected? So have it change the level and then right away adjust the health too..

  • The idea is that you create a Global Variable and basicly let the movement switch when the variable changes. And when you touch the block it switches the variable..