nacra's Recent Forum Activity

  • Use ‘For each key” to loop through dictionary entries. The docs describe this:

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/dictionary

  • My first thought would be to do it with events, doing a "set tile" as needed to randomize your map. But are you instead hand-building tilemaps, and want to load those at runtime?

    C3 Tilemap docs:

    https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/tilemap

  • Glennroh, I think you're on the right track there, with your formula like: [round((cost*0.95)+1)]

    I'd make a little table of cost and DMG points you want to hit and then come up with your formula. Test it in a spreadsheet and then code it. Maybe that's an OCD approach, but to me it's good for more complex situations and tuning sets of values.

  • Yeah, thanks for pointing out that behavior.

  • Okay, instead, add a local variable to contain the random value. Do this before your pick, and compare using the variable. Right?

  • Sure, you've tested your PHP but man it's helpful to run both the server (PHP page) and client (Construct 3 app) on the same machine and be able to step through each, to see what the server is really getting from the client.

    At a glance, I don't think you should be including a "?" in your POST data. (As you're not building a querystring for a GET.)

  • Conditionally disable solid on the player/enemy instead of the obstacle?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Stilts, I’d hope you could run and debug your PHP locally, so you can step through it and see what values you’re really getting from the POST.

  • Sami, okay good! If you’re doing your own server-side dev, then you may only want to use the built-in AJAX plugin in Construct to do POSTs and GETs. That said, I am looking at PlayFab to get all of those services...

    And you can forget about that http header, as long as you’re loading the game from the same domain as your web app. But Google that term and you’ll find some good explanations, e.g., https://en.m.wikipedia.org/wiki/Cross-origin_resource_sharing. But I swear I’ve run into cases where a firewall, on a college network, didn’t allow cross-origin ajax calls even with the needed Access-Control-Allow-Origin header set.

  • Saving data to your web application requires server-side development, for example, using PHP and MySQL. Someone asked a similar question here: https://www.construct.net/en/forum/construct-2/how-do-i-18/newbie-question-on-load-save-d-58990. I’m not finding a Construct 3 tutorial but the ideas are the same.

    To avoid server-side development, you could look at services like Firebase or Parse, or PlayFab or GameSparks. I don’t know of any Construct 3 plugins for these now, other than maybe ‘s Firebase plugins: https://chadorirebornxd.itch.io/construct-master-collection

    And about access-control-allow-origin, it’s one of those many server-side details. In a nutshell, it’s only needed when your game (html & scripts) loads from a different website (e.g., site A) than your web api server (site B). It’s set as an http header on your api app, allowing your site A app to make Ajax calls to site B. I think all of the hosted services, like Firebase, allow you to configure it.

  • Have you checked that they support the C3 runtime? To see that the plugins are C2 only, create a little test project, and set it to use the old C2 runtime. Try adding those plugins. If you can, you’ve demonstrated that the plugins are working, but are C2-only.

  • ...we already covered a max spritesheet size setting.

    And it's coming in the next beta release! Thanks Ashley, hopefully that helps Taximan's memory use.

nacra's avatar

nacra

Member since 1 Nov, 2017

Twitter
nacra has 2 followers

Trophy Case

  • 7-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

10/44
How to earn trophies