piranha305's Forum Posts

  • is any one else experiencing inconsistent cloud saving in the new beta. so pretty much the browser just seems to hangs and it does not save, also preview stops working after a while.

    it stays at zero percent, there are no console errors, inspecting teh network tab it's making a request to z-worker

    this request stays pending indefinitely

    This seems to be happening on a regular basis, I am going to file a bug report, but it would also be good to know if anyone else is having the issue just to rule out it being project related, or maybe a connection issue on my end.

  • I don't think that happens currently, when I import js script on project section I don't get syntax highlighting or errors.

  • i just clicked that longer than i thought i would, good job!

  • using load scripts is a good idea, so the project files does not have an option to create a new js file, that only exists under the script folder. a work around is to import the js file, using the project file import. but if you wanted to create one that option is missing

  • the folder thing is nice, i did not think of that, i have been merging all my js into one file in the order i needed. but that get really tiring when you have more than 1000 lines in one file. thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • is there a way to control the order in which scripts are loaded on the page? if i have serveral js files how can i ensure they are loaded in a specific order.

  • you can also wrap each of your functions in a class

    class gun
    {
    	constructor() {}
    	show() {
    		alert("gun");
    	}	
    }
    
    class laser
    {
    	constructor() {}
    	show() {
    		alert("laser");
    	}	
    }
    

    then you would need to create instances of each of those classes

    const gunInst = new gun();
    const laserInst = new laser();
    

    then on your button click you can do

    gunInst.show();
    
  • here is the link to the issue

    https://github.com/Scirra/Construct-3-bugs/issues/3104

  • so something interesting that happens is if you have chart.js and chart.css these guys get nested togetehr

    now depending on what you imported first it will get nested in the scripts folder or the project folder.

    not sure if this is bug or intentional.

    drive.google.com/open

    i have attached a gif of the behavior. it does not seem to have any major impact that i am aware of.

  • that is great stuff to know, some of these charting libraries also require you to attach a css file as well. just including the css file in the project does not attach it to the page. in a case like what is the recommended approach?

    should we append to the head element when the pages loads up? or does construct have a way to include any css file import as a style tag?

  • You can't collapse a whole event sheet script block at the moment but I think this is something we will do in future.

    That would be very awesome, thanks!

  • construct3.ideas.aha.io/ideas/C3-I-967

    code folding will be invaluable for long javascript files!!!!

    this is not really important, but i hope you guys consider it for the future!

    Tagged:

  • i was able to solve this by mixing both events and js

    the way i solved this was by having a function whose condition picked object by using is on screen in system. that function executed sciprtInEvents, where it would iterate the picked instances and and push them to my queue.

    var instances = runtime.objects.Moveable.getPickedInstances();
    for(let i of instances){
    	//queue up instances that appear on screen 
    	turnSystem.queue.enqueue(i);
    }
    

    then from my turn system class. i execute this function at the start of every turn cycle. you need to have a different mindset when trying to reason about events and java script together. but so far it's turned out to be really powerful.

  • Using the scripting API, do we have access to the view port coordinates? I want to create a filter like the system condition is on screen for the instance. Is that possible with properties exposed now (did i miss it) or is that something that is coming in the future?

    Tagged:

  • okay thanks, just making sure you guys did not have a better way!