[Behavior] moveto

2 favourites
  • rexrainbow

    Any chance for this?

  • Havok

    Like blackhornet said, Scirra has not released behavior SDK yet, but I don't have time recently, either.

  • Try Construct 3

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

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

    Like blackhornet said, Scirra has not released behavior SDK yet, but I don't have time recently, either.

    Thanks Rex, when I asked they said the SDK is out but seems specific parts are not done and thats where I got a bit confused.

  • I'm getting an error with the latest MoveTo build in C2.

    Unable to get property 'simright' of undefined or null reference.

    http://localhost:50000/Platform/behaviour.js, line 1221 (col 12)

    Any thoughts on this? I noticed it happens when i attached the ( PlatformMoveTo move to (distance, Right side)

  • ephrisian

    rex_platform_moveTo behavior works fine in my test. Please provide a very simple capx to reproduce that bug.

  • I figured it out! I'm using the Platform Move To, but the object isn't a Platform.

    Basically I'm trying to figure out how to make a patrolling enemy that will flip around when they collide with a wall and walk the other direction.

    I had it pretty well established with ZigZag, but it involved a lot of clearing the queue and the restarting which made the enemy unpredictable after several starts and stops and resulted in them passing through the wall.

    [Desired Logic]

    Enemy LOS on Player => Enemy: ShieldUp, NotMoving, Invulnerable

    Enemy !LOS on Player => Enemy: ShieldUp, Moving, Invulnerable, Wait X, ShieldDown, Vulnerable

    • -> Player behind Enemy => Enemy: Vulnerable

    Enemy Moving => (F 50, L 180 (repeat))

    Enemy collide with wall => Clear Queue, L 180, Clear Queue, (F 50, L 180 (repeat))

  • During a MoveTo, if set the object's time scale to 0 and then restore it, the MoveTo speed becomes incredibly fast for the duration of the MoveTo.

    Still investigating, but has anyone else had this problem?

  • brushfe

    Please puting a very simple test capx for your issue, thanks.

  • Rex Thank a lot

  • Hi rexrainbow

    I'm facing a strange issue with the "MoveTo" behavior.

    It says remaining distance 0, but it's still saying "moving"

    The player is exactly in the position he has to be (that's why the remaining distance is 0).

    However sometimes it's "-0.00053", then the "moving" boolean is set to wrong.

    Could it be an issue that the "moving" boolean will not be toggled when the distance is exactly 0?

    Thanks for your help!

  • AndreasR

    Thanks, I had fixed the issue of negative of remain distance. Now it will be 0 when moved to target.

    But I did not find the first bug -- It says remaining distance 0, but it's still saying "moving", please provide a very simple capx for this bug.

  • AndreasR

    Thanks, I had fixed the issue of negative of remain distance. Now it will be 0 when moved to target.

    But I did not find the first bug -- It says remaining distance 0, but it's still saying "moving", please provide a very simple capx for this bug.

    Hi rexrainbow

    thanks for the quick fix. I figured out why the "is moving" boolean remains at true.

    I made a simple capx, please find it here.

    https://www.dropbox.com/s/9chra5d806k2w ... .capx?dl=1

    It's caused if you let move the player to a position he already is. So the distance is actually 0 from the start, but if you call the event "Move to [current.X, current.y]"

    the "is moving" boolean is true, but the player doesn't move actually, so it never gets set to false.

  • AndreasR

    1. In this tick, sprite hits target position, triggers that event, and try to move to (current) position,

    2. In next tick, sprite moves 0 pixel (is moving is true) and the same as step 1, sprite hits target position, triggers event and try to move to (current) position.

    3. repeat step 2, ...

    is moving is always true in this case. It is correct.

  • I am trying to download the move to plugin here:

    https://c2rexplugins.weebly.com/rex_moveto.html

    It's 16kb but is empty

    Cancel that. I installed 7z to extract it. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> Works now

  • I'm having some performance problems with moveto. I use cocoon.io and it works smooth as hell with the launcher app. When I compile it to iOS the objects running with moveto behaviour don't run smooth at all. It lags quite a bit and i'm on an iPhone 7 Plus. Are there any performance tips?

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