How can I delayed platform move

0 favourites
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Hello. I search in the forum but didn't find an answer.

    I have some platforms and I want each of them begin their move after the end of a timer. So I create a variable on the platform object, and I tried to decrease the number each tick. So when it comes to 0, I want to let the platform moves.

    But actually, all of my platform moves at the same time.

    So how can I delay the move ?

    Thanks for the help

  • Is not very clear what you trying to do:

    Do you have a problem stopping the objects?

    Or

    Do you have problems with picking which all objects move at the same time?

    Can you explain a bit more?

    Normally to stop the platform you can just use (Enable/Disable)

  • I have 2 platforms in my scene.

    I want the first one begin to move directly.

    And I want the other one begins to move after a delay.

    I didn't use a behavior. I update the x/y position at each tick

  • For delaying the second platform you can use "System Wait" 0.5 or so then move

  • Thank you.

    But how can I make it for a specific platform.

    If I use wait, it will affect all of them ?

  • Thank you.

    But how can I make it for a specific platform.

    If I use wait, it will affect all of them ?

    You need to pick each one independently, not sure how you pick, but by the looks of your events I think you call once the function so if you have more than one platform you will need a:

    System "For Each" Platform -------------------Action: Wait (DelayTime * LoopIndex)

    The first one will move right away:

    The "For Each" needs to be on the Top Event and move all that code inside the function on a subevent of the For each as you have some picking going on there.

    Note:

    You have the Sine Behaviour swell that can move platforms nicely with patterns.

    I dont understand the language but I dont see how you move the Platforms.

  • Thank your tarek2, I will try with the "for each". It seems a good idea. ^^

    Sorry it's in french you're right.

    Yes I know how to do it with sinus, but I wanted to have a fully custom movement with no behavior.

  • Thank your tarek2, I will try with the "for each". It seems a good idea. ^^

    Sorry it's in french you're right.

    Yes I know how to do it with sinus, but I wanted to have a fully custom movement with no behavior.

    Np Good luck, if you have any problems just post back.

    Just a quick note:

    To start the platform's movement and use the For each, make sure you call once as for me it looks like it calls the Function every tick when Timer is zero or less. if so you can add a "Trigger Once"

  • Unfortunately it didn't work. :/

    I probably did something wrong. Could you help me, more ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Unfortunately it didn't work. :/

    I probably did something wrong. Could you help me, more ?

    Yep that is the same problem I explained in my last comment, is calling every tick the Function, give me a second I need to check properly your events as I think we are talking about two different things, I thought that you just need to start moving the platform but now from your last events it looks like you actually move the platforms with that function so is not gonna work.

  • In fact, all of my platforms moves at the same time. They begin to move directly when I preview the project, without waiting any timer :D

    But you're right, I move my platforms usings the function.

  • I think to resolve it quicker I make a quick example to see if it helps:

    They start moving with a 1-second delay

    https://www.dropbox.com/s/ry6ueutxvdu7kbo/Move%20Platforms%20Delay.c3p?dl=0

  • Thanks !!

    But, I can't open it. I need a r339 version of Construct 3 ToT

  • Can you make a screenshot of your code so I can try to understand it?

  • Can you make a screenshot of your code so I can try to understand it?

    Visit this link:

    editor.construct.net/r339

    Open the project there and copy the events or just check how is done so you can replicate it in your project.

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