Laurent's Forum Posts

  • Hi Diego,

    Wow ! Thank you !

    I also came to the conclusion playbacktime had to be rounded and also choosed to make the sprite invisible if no value was found at a given playback time :)

    You're approach is more elegant than mine :)

    I'm now looking a way to download the array as a csv :)

  • Maybe you can help me with this :

    I try to make a little tool to manually record movement of an item on video. Here how it works :

    - video is playing

    - When user touches the video, current time code, touch.X and Touch.Y are recorded in an array.

    - Press Spacebar restarts video and clears array

    - press P at the end of the video restarts the video and allow to check if movement has been correctly recorded. Item position is represented by a red dot.

    So far, recording works (debugger shows that array is growing when video is touched).

    But replay doesn't work. to recover values, I'm checking the array index where recorded value matches current video playback.time.

    Any idea what is wrong here ?

    thanks !

    File is here

    dropbox.com/s/z72iqcugb52zsa1/RecordVideoSprite.c3p

  • Oh,

    I get it.

    thank you, yes, that will be a very useful addition to create augmented videos !

  • This is what I have so far in my timeline

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In my project, I have a video and a sprite.

    I need to make the sprite follow an item on the video when it is playing.

    In After Effects, I would use a tracking tool to record the item coordinates as the video plays.

    Obviously there is no tracking tool in Construct so I thought about pasting the video as an animation track of the Timeline, move the playhead to play the video image after image and record keyframes for my sprite.

    But I don't see how to play the video frame by frame with the animation timeline.

    How can I do that ?

  • You can cheat the scroll to plugin by attaching it to a dummy sprite A that will be screen centered and then position according to this sprite A the sprite B you want to be centered to your window.

  • I have to thank you very much for pointing me into the Hierarchy direction. I haven't paid attention to it so far and I discovered a whole new world.

    Thank you ! Now it works

    For anyone interested, here's a commented project file

    https://www.dropbox.com/s/hkw9g396zrnw5ha/DragAnimationLevels.c3p?dl=0

  • I had a long look at hierarchy and yes, it looks like very powerful and useful feature.

    According to the drawing I posted before, let's say that Blue square and Yellow square are part of a family called Square and every sprite children's name would be the number/letter they have (so Sprite.A, Sprite.B, Sprite.1, Sprite.2) . Would your previous code be :

    -For each Square

    Parent pick all Child : Child move in front of Square

    I found Child "Parent pick all Child" condition but not "Child move in front" action

  • Got it. But how do I do if I have many children attached to the main object of a container and many container (that don't share the same objects)

    Here's a quick sketch of how it looks like

  • When changing z-order or moving to another layer, you need to do this for each object in the "container".

    If you need to do this often, you can make an event which moves all child objects above the parent object on every tick. Also I suggest using hierarchy instead of pin.

    > For each Parent
    Parent pick all Child : Child move in front of Parent
    

    Thank you !

    Actually, I've to do it quite often with many different containers.

    I tried your method but couldn't find the action "Child move in front of Parent"

  • My game has an object container made of 3 sprites. Basically, it's a big sprite with two sprites pined on it acting as buttons.

    At certain times of the game, when clicked, I need the object to :

    1) move in front of other objects on the scene

    2) move to another layer.

    So I send the commands to the main element of the container and find out that

    1) only the main element is send in front

    2) only the main element is sent to the other layer

    I thought that when an order was sent to the main element of the container, the whole container would act accordingly to and behave as a single object. ie, when main element is sent to front, all the object elements would be sent to front and be rearranged. The same when the main element is sent to another layer. All the elements would follow and be put at the right place and zindex.

    Is there a simple way to fix this ?

    Tagged:

  • You do not have permission to view this post

  • Lovely ! It works ! Thank you !

  • Thank you very much for your solution !

    Actually, I'm almost there !

    I gave up the idea of rotating around touch point.

    And now, I've got the perfect type of movement I needed.

    One thing I couldn't fix so far is to have dragged element come in front of the rest of the scene

    Code is here

    https://www.dropbox.com/s/ovrvhtt7gfbwijo/TestDrag2%20copie.c3p?dl=0