chunchun's Recent Forum Activity

  • Yes, you can get instance image points in JS。

  • It's not possible to autocomplete that, because the editor doesn't know what 'this' refers to.

    I hope “this“ can have all the complements, so when you type some characters, you can choose what you want, instead of displaying nothing

  • Sorry, it's me again! At present, there is no API for this behavior, so you have to use the same method in the email I sent you.

    Or a more complex method to access the runtime SDK, but that method is more complex.

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks

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

chunchun's avatar

chunchun

Member since 20 Jun, 2019

Twitter
chunchun has 1 followers

Trophy Case

  • 5-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies