How do I move a locked object to a pre-determined position?

0 favourites
From the Asset Store
This is a code so you can see the same skin on all screens (peers). Each peer gets a skin, in addition to 4 directions t
  • Hello C2 Gamemakers!

    I would like to how to make a object controlled by the player (player character) to be automatically moved (but not teleported) to an X position and Y pre-determined after an event that locks the control of this object? I tried a number of ways, but it still fails.

    Once again I thank the attention and participation of the C2 community.

  • Have you tried the MoveTo behavior?

    Maybe that is what you want?

    A list of all the plugins are here

    As of today, it is the first one listed.

    https://www.scirra.com/forum/c2-plugins-and-behaviors-list_t65170

  • Thanks for the tip,

    I have not tried, because generally I prefer to use the native capabilities of C2 instead of plugins. It is true that plugins can cause bugs to the game?

  • Maybe some plugins can cause some problems, but the MoveTo has never given me any problems.

    Try it.

  • MoveTo is perfect I been using for sometime. I even written C2 tutorial as well check it out

    https://www.scirra.com/tutorials/1298/snakes-ladders

  • Thanks for your collaboration, and

    If you two say that this plugin work well, I'll use it. ^^

    PS.: Now I'm using it and everything is working perfectly.

  • you can also use moveforward or moveatangle function from the object setting a boolean on the object, when boolean is true, will act as an everytick condition and then move at the angle you give, you wold have to calculate the angle(obj.x,obj.y,destination.x,destination.y) and rotate the object towards the same angle, by using set angle or rotate toward angle and use the angle(obj.x,obj.y,destination.x,destination.y) to give a destination. that's if you don't want to use any custom plugins, and you don't care of adding a few events

  • you can also use moveforward or moveatangle function from the object setting a boolean on the object, when boolean is true, will act as an everytick condition and then move at the angle you give, you wold have to calculate the angle(obj.x,obj.y,destination.x,destination.y) and rotate the object towards the same angle, by using set angle or rotate toward angle and use the angle(obj.x,obj.y,destination.x,destination.y) to give a destination. that's if you don't want to use any custom plugins, and you don't care of adding a few events

    Thanks for your help,

    I tried unsuccessfully something similar before, but today I will try to implement your suggestions and give a feedback here.

  • I think MoveTo a essential plugin and I think Scirra should make it a native behavior in future versions of Construct, to further optimize the game development time.

    What do you think this, veteran developers?

  • [quote:1k8l5qoa]I think MoveTo a essential plugin and I think Scirra should make it a native behavior in future versions of Construct, to further optimize the game development time.

    What do you think this, veteran developers?

    totally agree

    Ashley

  • I do not agree. Ashley &co must have good reason for not included this

  • I do not agree. Ashley &co must have good reason for not included this

    What are the reasons for not including him, Lordshiva1948?

  • lukezero why don't you ask him? Are you lame or what? Why do you wish to have everything in your plate? Did your parents fed you everything at once or what?

  • lukezero why don't you ask him? Are you lame or what? Why do you wish to have everything in your plate? Did your parents fed you everything at once or what?

    Hold on, No need to be rude. I just wanted to know the reason for the omission, since the plugin is very good and functional.

    Peace.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lukezero So sorry I should have not said that. I am sorry for hurting your feeling lukezero

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