UberDark's Forum Posts

  • You mean your character on the screen? A car? You will need to be a bit more specific i'm afraid.

    If it is a character, do you use 8-directions control or platformer? Or is it just an object that is animated to automatically move by setting coordinate increments?

  • From what I can see the order in which you create them is the order of tab switching. Possibly related to UID? I would suggest changing around the boxes and renaming them. Perhaps someone knows of a better way but this would solve it I know from experience.

  • How do i create makeup game similar to http :// primarygames. com/ arcade/ dressup/ makeupmania/

    in Construct 2

    In general 'dress up games' are just a bunch of variables and drag and drops with overlap detection. Something you can easilly learn from the Construct 2 tutorials on this page. If you have specific questions i am sure people here wouldn't mind answering however.

  • Having a project with a map on which i place little flags (markers) and I drag and zoom the layers that have the map on it. The rest of the layers with for example the UI stays at scale 1. This caused a problem where if the layers with the map and markers were zoomed in and I placed a new marker the coordinates needed adjusting, so I used CanvasToLayerX(2, mouse.X, mouse.Y) and CanvasToLayerY(2, mouse.X, mouse.Y). Everything went fine and the flag would show up where I clicked on the map. Then I pin the flag to the map so when I scroll (drag) the map they move along with it.

    Now when placing a marker I send the coordinates I got from CanvasToLayerX and CanvasToLayerY to a mysql database. On start of layout I load them.

    They do not load in the right spot though.

    When I place the markers while all layers are at scale 1 (completely zoomed out) and I load them while the map is at scale 1 it all works. If I place the markers while zoomed in though, they fail to load on the correct spot.

    I hope this is clear without uploading a .capx cause I would have to edit a lot on my project to not give away server details and such.

  • I don't think so. If you change the 1st frame of the sprite to a higher resolution picture all ingame assets will change proportional. Unless you have the size of certain assets already set through the event sheet somehow. Sorry//

  • If it is anything like the webstorage and AJAX options for storing data it has to do with the fact it gets an error when retrieving the highscore. NaN means Not a Number. So it expects a number but gets text pretty much.. Usually this is an error message of some sort. Perhaps local storage cannot be reached from the arcade? Maybe due to a relative path situation?

  • Tokencount? Awesome!

    And then I just use the 'set size' and that will solve my problem yeeeeuy

    CHEERS LittleStain

  • I want to load data into an array but the amount of data depends on the mysql database and that amount of data can grow and shrink.

    I am placing little flags on a city map and have 4 bits of data coming in per flag. (id, color, x-coordinate and y-coordinate)

    The number of flags will change constantly though because users can add and remove them.

    So every time the map loads it gets the current flags (4 bits of data each) from the mysql database.

    I want to have a 2 dimentional array to load the data into and use a row per flag. So position 1.0, 1.1, 1.2 and 1.3 are the first flag.

    Then 2.0, 2.1, 2.2, and 2.3 for the next etc..

    But I don't know how many flags will be loaded so i cannot beforehand create the array since I don't know the size it has to be yet.

    So is there a way that i can either..

    -Check the number of bits of data that come in through AJAX.LastData (divided by a separator). And then quickly create the array in the right size and load the data into the array?

    OR

    -Create a 4x1 array and increase the Y size of the array on the fly while loading data into it?

  • I see! Cool glad you figured it out. Sorry i didn't understand.

  • For scrolling:

    Make one 16x16 object and stretch that to fit the screensize. Break the high resolution map up in smaller pieces and 'pin' those to the 16x16 object. Make the 16x16 object draggable. This way you only have to animate one object and have a map that can be higher than 2000x2000 pixels.

    For zooming:

    Now make a global variable named "Zoom' which has a default of 1 and set the layer scale to match this variable. On mousewheel-up add 0.2 to the variable 'Zoom' and on mousewheel-down subtract 0.2. On every tick set layer scale to 'Zoom'. If Zoom < 1 Zoom = 1.

    I hope this helps. I cannot open your file for i am using the last stable version and you hve a newer version of C2.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Works like a charm by the way.

    Awesomeness!

  • Hold on.. I initially asked if <script> was the way to go but you corrected me it should be <javascript>..

    Now you use <script>?

    Confusing haha

    Cheers though man. You rule

  • In that case i was overthinking..

    Thanks

  • ramones

    Will it just forever be auto incrementing and leaving empty spots then?