dop2000's Forum Posts

  • Well, I tried "AJAX Post to URL" action with the following settings:

    URL: "test.txt"

    Data: "some data"

    Method: "POST"

    I exported and uploaded the project onto the server, set folder permission to 777, but when I run it, the file is not created.

    If I create the file manually in this folder, I receive its content in AJAX response, but still can't write to it.

  • Do you get any error, what is the error message? Did you install the plugin correctly?

  • 1. "Trigger once" in events 24 and 27 doesn't mean "once per instance". This is a very common mistake people make. I don't like using this condition in sub-events, and especially in loops...

    2. In events 18-28 you loop through Player_Coll and pick their linked Player_Arms, but you don't pick the correct Player_Image instance for each Player_Coll. That's why there is a mess with z-order.

    .

    I suggest you read about containers. Put Player_Coll, Player_Image, Player_RightHand, Player_LeftHand sprites into a container. It will be much easier to manage them, you can create Player_Coll and other objects will be created automatically, just need to position them and pin.

    Same with destroying - just destroy one object and don't care about the rest.

    You will not need PlayerIndex variable, when you pick one object instance from the container, others will be picked automatically in the same event.

    So your event #18 will look like this:

    For each Player_Coll
     If Player_Image is mirrored -> LeftArm move in front, RightArm move behind
     else -> LeftArm move behind, RightArm move in front
    

    Easy!

  • Answering your second question - you can import the CSV file with all C1s/C2s into the project and then use this plugin to read it:

    construct.net/forum/extending-construct-2/addons-29/plugin-csv-csv2array-csv2dicti-41868

    You can load data from CSV into an array or dictionary, or create text instances, or just request individual values as you need them.

    Make sure to save the csv file in Unicode.

  • I think when you click a unit, event #5 sets isSelected to true, but event #6 immediately resets it to false.

    Also, you are moving the unit with MoveTo behavior, but checking if it's arrived using Pathfinding behavior event. Does it really work??

    It's pretty hard to figure out what's going on by the screenshot, could you post your capx?

  • It's hard to tell what's wrong by just that screenshot, you need to post your capx.

    You should probably add "System Trigger once" condition to events 48 and 49.

    .

    Also, it's quite weird to see string values "true" and "false". Usually you create a numerical variable and set 0 for false, 1 for true.

  • You can probably post a file with AJAX, but when I tested it didn't work. Maybe something was wrong with permissions or incorrect headers or something like that..

  • I'm not sure about saving files on the server, but you can save survey answers into a database.

    scirra.com/tutorials/346/online-high-score-table-ajax-php-mysql

    scirra.com/tutorials/4839/creating-your-own-leaderboard-highscores-easy-and-free-php-mysql

    Another option is to use Firebase:

    scirra.com/tutorials/5015/getting-started-with-firebase

    I also recently completed a little project where data from Construct 2 was sent to a Google Spreadsheet. If you want, I can explain how to do it.

  • No I can't. Loading screen is stuck at 0%

  • "Vertical" means changing Y coordinate.

    So use "Set target" action, target:"Y", value: your variable

  • There is another action - "LiteTween Set Target", it allows to use a numeric variable.

    You can also convert a number to string using str() expression.

  • I believe many of these services don't require any "coding". You send an AJAX request with an URL containing altitude and latitude, and in the response you should receive the country code.

    For example:

    http://api.geonames.org/countryCodeJSON?lat=49.03&lng=10.2&username=demo
    

    .

    Just find a service which is free (or within your budget) and easy to use.

    Also, if your game is in C2, why did you post this in C3 forum?

  • I tried your link again - adblock blocked 67 ads!!! And still no game.

    Maybe you should find a new less greedy friend, who could properly publish your game. Or simply upload capx file to dropbox or similar service.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Image Upload is not working, getting "An error has occurred [Error, Unknown object type]"