[Behavior] moveto

2 favourites
  • ebaybrabs

    This moveTo behavior only moves object to a specific position, it won't move x or y vector separately.

  • i have this plugin since 2012, i cant believe how many things have now o.o

    it is safe to rewrite it? cause my game uses it and i dont know if it may crash it if i change it...

  • IJCT

    Yes, this behavior had modified and fixed bug before. It tested fine by this sample capx after exporting.

  • This plugin is incredible, but I was wondering if it is possible to be able to move the X position and the Y position separately. In the Construct 2 project below, I have two squares, the blue square that moves side to side, and the green Clown square that moves up and down at certain times. I've tried messing around with the events and actions, but the result doesn't work and the square either stops moving side to side or stops moving up and down. I basically want to make it so that the functions/actions in both the blue and green squares can be applied to 1 square. Is that possible, or not really?

    Also just a minor thing, the action Set Current Speed doesn't work for me. Whether I set it to 0 or 400, the speed of the moving squares is the same.

    https://www.dropbox.com/s/k7e02l9qib297yx/ClownMoveTo.capx?dl=0

    You can do it by using this plugin as following:

    Suppose that you have 2 sprites (Sprite1 and Sprite2) and you want to make sprite1 to move only horizontally to Sprite2 when press the left mouse button and you want to sprite to sprite2 vertically when pressing the right mouse button, you can use this code (2 Events):

    Mouse -> Left button is Down -> Sprite1 -> MoveTo move to (Sprite2.X, Sprite1.Y)

    Mouse -> Right button is Down -> Sprite1 -> MoveTo move to (Sprite1.X, Sprite2.Y)

    That's it.

  • HI Rex i just wana quick say , Thank you for all your awesome plugins are top class and is such a time saver for people like me that dont know the math or programing

    I have a quick question, im using MoveTo and i been trying for a few weeks to make objec2 avoid

    with a curve around the object1 while they are moving constantly i manage to do something similar but still not smooth enough do you thing is posible to make this movements? and if yes would you mind to show me an example will be really really helpfully

    thanks a lot in advance

    this is the capx: https://www.dropbox.com/s/bb6zxw068iykfrg/AvoidObjects%20%281%29.capx?dl=0

  • tarek2

    Try to combine bullet behavior + set angle toward position (or turret behavior) to move object more smoothly.

  • tarek2

    Try to combine bullet behavior + set angle toward position (or turret behavior) to move object more smoothly.

    rexrainbow Thanks so much for the advice I tried the bullet behabior + set angle and some experimenting and i manage to do what i was after and is runing smoothly like you said MoveTo is still amazing though

  • rexrainbow is it possible to make the movement appear as though it uses a lower framerate by only showing intermediate positions related to the animation speed in the move? If you see his motion here: https://youtu.be/WjvD3C_nvBk?t=172 he's only repositioned if his animation frame changes, which takes away some of the "glide" effect that smooth motion adventure games have. AGS had/has an "anti-glide" setting: http://www.adventuregamestudio.co.uk/wi ... oAnimation Is this something that can be done with moveto, presumably by using delta?

  • Zebbi

    rex_moveTo behavior moves object every tick with dt. Dt will be changed depended on frame rate. It does not necessary to make another feature to move in lower framerate. imo.

    Set position at specific event is another issue, it is better to have another new behavior for "MovementLinkedToAnimation". But I don't have plan for this behavior.

  • Zebbi

    rex_moveTo behavior moves object every tick with dt. Dt will be changed depended on frame rate. It does not necessary to make another feature to move in lower framerate. imo.

    Set position at specific event is another issue, it is better to have another new behavior for "MovementLinkedToAnimation". But I don't have plan for this behavior.

    Is there a way to do this with events, so the object is only visibly moving at intervals, to give the appearance of a lowered frame rate?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sprite > On frame changed

    ....... move pixels

    System > Every X seconds ..... time = random(1/12,1/60)

    ....... move pixels

    System > Every X seconds ..... time = 1/15

    ....... move pixels

    System > compare two values ... value 1 = tickcount%5 .. = .. value 2 = zero

    ....... move

    If you wanna use a behaviour

    System > compare two values ... value 1 = tickcount%3 .. = .. value 2 = zero

    ....... system > Set object timescale .. zero

    Else

    ....... system > Set object timescale .. 1

  • Sprite > On frame changed

    ....... move pixels

    System > Every X seconds ..... time = random(1/12,1/60)

    ....... move pixels

    System > Every X seconds ..... time = 1/15

    ....... move pixels

    System > compare two values ... value 1 = tickcount%5 .. = .. value 2 = zero

    ....... move

    If you wanna use a behaviour

    System > compare two values ... value 1 = tickcount%3 .. = .. value 2 = zero

    ....... system > Set object timescale .. zero

    Else

    ....... system > Set object timescale .. 1

    Now, the behaviour with the timescaling, that won't keep the relative speed correct, will it? It'll just be pausing the character every other tick, but the character won't move further down it's route in between pauses, will it?

  • Of course not, it is the effect you want. A fake lower frame rate. No ?

  • Of course not, it is the effect you want. A fake lower frame rate. No ?

    Yeah, a fake lower frame rate, I just thought timescale paused the movement's time without it catching up after the pause?

  • Hello, moveTo does not have the option to use with the angle.

    I mean, move the angle of an object from point A to point B.

    Would you consider adding the angle option?

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