How do I create custom movements

0 favourites
  • 5 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hi all,

    I need to create two different types of custom movements for a game I am working on.

    I don't know if it is necessary to use custom movements or there is a behavior that can make this to work.

    Basically, I need to go from point A to point B.

  • I was able to create the fist movement but not the second.

    Any help?

  • the second is trig.

    Loop this

    angle =+ 1

    radius =+ 1

    x = cos( angle ) *radius

    y = sin( angle ) * radius

    then tinker as needed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your solution almost worked for me. However, I have some small problems:

    1) How can I make the object to start the movement in the center of the layout?

    2) The movement grows way to fast when I add 1 but too slow when I add 0.1. what should I do?

    Here is what I am doing:

  • If you want an object to be placed in the middle of a layout you can do this (see picture).

    If 1 is too fast and 0.1 is too slow you might need to take a different approach than using "every tick".

    If you make a global variable called "timer" and then add 1 to it every tick you can use that to change how often the calculations are triggered. So basically:

    Every tick - Add 1 to "timer".

    If "timer" = x (try different numbers to see what works for you) then set "timer" to 0 and also trigger the calculations once.

    Hope that made sense.

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