chunchun's Forum Posts

  • I cannot auto-complete when using "this"

  • Hi

    Thanks for your help

    can you send the cap file here, thankyou

    fonovi5724@tgres24.com

    It has been sent to you, please check it.

  • Can you take a quick look at my construct file

    still shows error

    thankyou

    qurantour.com/car/moveto.c3p

    I checked your source file. I found that you still don't understand the working principle of C3. You can change to JS development mode after you are proficient in event table. I modified your source file. How can I contact you?. If you use QQ, I can send you the changed file.

    Or leave your email address. I will help you

  • There is currently no API for this behavior. Therefore, the event table can only be called through runtime. Calfunction to perform this function

    I do this:

    First, you need to create a family that contains all objs, and then give the family conditional behaviors, such as moveto behavior.

    Then create a new function nameed "move", whose parameters are uid (used to select which obj in the family to execute), endx, Endy, SPD.

    Filter to the specified uid through the uid of the family, fill in the move to event in the action, select to position, and then fill in the parameters endx, Endy and SPD.

    So you can call it in JS

    For example, you want a object to use moveto

    	let a =runtime.objects.a.getFristInstance()
    	runtime. callFunction ("move",a.uid, 30, 30,100) //the specified object, to move to the position number, and the speed of movement
    
  • GREAR it is work !

  • Here's an example:

    > let myVariable = 123;
    
    runOnStartup(async runtime =>
    {
    	runtime.addEventListener("save", OnSave);
    	runtime.addEventListener("load", OnLoad);
    }
    
    OnSave(e)
    {
    	// Save myVariable by adding it to saveData
    	e.saveData.myVariable = myVariable;
    }
    
    OnLoad(e)

    {

    // Load myVariable by reading it from saveData

    myVariable = e.saveData.myVariable;

    }

  • I currently use runtime. Callfunction to break some restrictions

  • getInstanceByUid

    It's great. It breaks a lot of restrictions. I hope to open more APIs and conditions for us to use in JS. This is a good start

    I want open API behavior:

    MoveTO

    TWEEN

    PATH

    PIN

    SINE

    FADE

    LINE OF SIGHT

  • thanks

    Do you think about adding c3runtime API plug-ins to [VS Code IDE]? Let's autocomplete on [VSCODE IDE]

  • I use external editor to write code, how to automatically code.

  • great!

  • I want to know what C3 team is doing now, and what will be done soon!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've written a

    function

    that helps you filter from the criteria in the event table to whatever you want to filter.

    	//alert('Hello world!');
    	 function getIns(a,runtime) {
     const ins =runtime.objects[a];
     for(const insins of ins.getPickedInstances())
     {
     return insins;
     }
     
     }
    
    	fun 
    

    You can get the

    name of the obj

    you want to get!

    	//alert('Hello world!');
    	const player =getIns("player",runtime);
    	You got it!
    

    Of course, this is just my way! If there is a better and faster way, please let me know! I want to share him, you can get started quickly!

  • “You can now use 'Reload from folder' in the Project Bar to update the Construct editor with a file that was edited on disk,”

    I tried to find the button, but I couldn't find out what was wrong. How do I use this feature!

  • It's an interesting question and one I've not given much thought to, because nearly everything about running a small company like ours is basically about ruthlessly prioritising extremely limited resources between hundreds of possible things that we could be working on. However if we had unlimited resources, a few things I'd like to see would be:

    - making C3 a comprehensive animation tool as well, based around the timeline. This would involve scene graphs, full vector support everywhere images can be used, and more advanced animation features. Basically what Flash used to be for animation on the web.

    - full support for using C3 as a pure coding IDE in addition to event sheets (note this is taking nothing away from event sheets, which are still an essential part of the product). Basically the best of both worlds, excelling in both programming and non-programming.

    - full international support, with the full C3 manual and all tutorials translated in to lots of languages, and support teams all over the world able to provide good support in a wide range of languages and countries

    - widespread use of C3 in education internationally, with comprehensive curricula for teachers to use for a wide range of education systems around the world (including in a wide range of languages)

    - pretty much everything filed on the suggestions platform, including some basic 3D features, ability to make plugins/behaviors etc in events, and the long tail of everything else everyone wants.

    It's nice to dream, but we have very limited resources. I don't think many people appreciate how much everything we do is driven by opportunity cost - i.e. doing one thing means not doing everything else that could be done. So is the thing we're doing the most important thing that we could be doing? It's a really hard judgement and often impossible to tell. I know some people may feel impatient when asking for features that were asked for a long time ago but still haven't been done, but imagine 20 similar features with lots of people asking for those, each one taking 6 months (so there's ~10 years of work being asked for). If we pick two and spend an entire year doing them, 18 are still left behind, and that's 18 sets of users still impatiently asking for the same things. It's impossible to do everything.

    I'm looking forward to this

    - full support for using C3 as a pure coding IDE