dop2000's Forum Posts

  • You are probably picking one enemy in this event. Try adding "System pick all". For example:

    Bullet on collision with Enemy
    	System pick all Enemy 
    		Enemy Flash...
    

    If this doesn't help, please post your code.

  • It would help if you could explain what kind of game you are trying to make and post your project.

  • NWjs.AppFolder should be automatically set to your apps folder.

    Just output it to a text object or browser console (Browser Log NWjs.AppFolder) to see which folder it refers to on your pc.

  • In my example there are two instance variables - TStick.a and TStick.d

    d is the distance from the center of thumbstick, and a is the angle (direction). It's up to you how you use them. For example, you can move your character with Bullet behavior, set speed to d and set angle of motion to a.

  • Ooh that sounds complicated! Is there any tutorial on it?

    It's a very common trick used in many games, and it helps to avoid lots of issues caused by changing player animations.

    There are lots of tutorials, here is the first one I found, read the first page:

    construct.net/en/tutorials/building-a-platform-game-a-beginners-guide-115

  • Yeah, you can save your project as a folder (not as capx), and then you will be able to modify json file while the game is running in preview on mobile. If you request the file with AJAX again, it will load the updated file contents.

    Don't add any path to the file name. Use AJAX Request URL action, URL="Mobile_Test.json"

  • You can compare X and Y. Say, Object.Y should be < than Target.BBoxTop, Object.X should be between Target.BBoxLeft and Target.BBoxRight.

  • tarek2 Path like "D:\..." will obviously not work on mobile. I guess, if you want to access the file from the local drive, you'll need to run some web or ftp server on your pc. Otherwise the easiest solution would be uploading it to the internet and requesting it with ajax.

    soviet shrek Try this:

    NWjs.ReadFile(NWjs.AppFolder & "test.json")

    In my case NWjs.AppFolder="C:\Program Files\NWjsForC2\win32\", so when I put test.json into that folder, it works.

  • Set s to NWJS.readFile("d:\temp\file.json")

    Or you can even load it directly into the array:

    Array load from JSON NWJS.readFile("d:\temp\file.json")

  • Didn't know about ReadFile expression, it's much easier than requesting files with AJAX. Thanks!

  • Use AJAX Request URL, and put the path to json file into URL field. You need to set the preview browser to NW.js

  • You can try Enhance:

    enhance.co/documentation/construct/setup

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I also converted most of the every-tick events to every after 0.03 seconds.

    This is not a solution. These events will still run approx every 3 out of 5 ticks. If you have lots of such events, you need to change the logic, use more triggers, functions, on timer events etc.

    For example (this may not be the case in your game, but I've seen it too many times) - testing if Enemy.health<=0 on every tick. This is unnecessary, you can do this check in the event where the enemy is hit.

  • The number of objects doesn't matter as much as behaviors and effects you have applied on these objects, and events that are running on every tick.

    Effects can be very slow on mobile, as well as some behaviors. Try to disable them when not needed.