Can we use the command Moveto in Javascript

0 favourites
  • 6 posts
From the Asset Store
In this game you will command the character by voice command.
  • HI

    Can somebody tell me how to use the

    Moveto command in Javascript


  • 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
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can you take a quick look at my construct file

    still shows error


  • Can you take a quick look at my construct file

    still shows error


    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

  • Hi

    Thanks for your help

    can you send the cap file here, thankyou

    It has been sent to you, please check it.

  • ahhhhhhhhhhhhh

    thanks so much, that was brilliant,

    thankyou friend

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)