dop2000's Forum Posts

  • Yeah, new function parameters work differently, see this video from Ashley:

    Subscribe to Construct videos now
  • Use two actions, for example - Simulate control Left, Simulate control Up.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is an example showing how to call JS functions and receive results back in Construct 2 events via callback functions:

    dropbox.com/s/f9vte9290eidvm6/JS_Callback.capx

    It's much easier in Construct 3, because it supports scripting.

  • Check the console log for errors!

  • A quick google search told me that you can use .stringify(anObject) and JSON.parse(string) to convert objects to strings and back. So convert to a string, set this string to a global variable, save this variable in Local Storage.

  • You have two options:

    1. Host leaderboards on you own server. You will need a web-server with MySQL database running on it. Search the Tutorials section for words "MySQL", "PHP", there are plenty of examples.

    2. Use one of the online services like Kongregate, GameSparks, Newgrounds, PlayFab, Firebase etc. Again, you will need to do your research, choose which one you want to use, download an addon for it.

    construct.net/en/make-games/addons/plugins

    chadorixd.itch.io/construct-master-collection

  • Learn to use families - add all enemies to a family, remove Pathfinding behavior from individual sprites and add it to the family instead. With the family you will be able to reduce the number of events significantly.

    "Regenerate obstacle map" is only required if you add/remove/move obstacles, which I don't see you doing in your code. If you are only spawning new enemies, you don't have to regenerate the map.

    And if you do need to regenerate the map, just one action is enough, not six.

  • Run Preview.

    In Preview window (not in the Editor window!) press F12 and select Konsole tab.

    Also, try Chrome browser.

  • I tried your project and it works for me, the video is playing.

    How do you preview? Try pressing F12, check if there are any errors in browser console.

  • Funny, someone asked almost exactly the same questions 4 days ago.

    You can't write to JSON files. Well, it may be possible with some php script running on the server, but this will change the database for all users.

    Don't think that saving/loading 30-50K records in local storage will be a problem if you are not doing this too often. And of course, it depends on the data. You can estimate the size of your array/dictionary: len(Array.AsJSON)

    If it's less than a couple of megabytes, I guess you should be fine.

  • Right-click Videos folder and import your videos.

    In Video object properties set WebM Source= your video file name.

    It should start playing automatically.

  • You need to use "Regenerate obstacle map" action. On a big map this can cause lags, so when possible try to only regenerate a small region. And after that, you need to refresh path for already moving units.

    "Regenerate" is completed on next tick, so your event may look like this:

    Drag&Drop On Wall dropped	
     -> Unit regenerate region around Wall
     -> Wait 0
    	Unit is moving along path
    	 -> Unit stop
    	 -> Unit find path to...
    
  • I think what happens is you make player's time scale=1, and everything else 0.15, so your player is not slowed down.

    You need to use "System restore object time scale" action, instead of "Set time scale=1"

  • Need more information. Do you need a local or global leaderboard? If global - what platform are you making the game for? (web, desktop, Facebook, Android, iOS etc.)

  • Everywhere you have tokenat(tokenat(AJAX.LastData, i, "|"),1, ";") - wrap it in trim():

    trim(tokenat(tokenat(AJAX.LastData, i, "|"),1, ";"))