Laurent's Recent Forum Activity

  • My game is base on TileMovement and there is a case where a sprite can move in diagonal, ie Up then Left. I use Simulate to give movement to the sprite. Simulate up, down, right, left is ok but when I tell the Sprite to go Up then Right, only the first command is applied.

    Is there a way to make this work ?

  • Do you create an Element instance in runtime? Did you tick "Create hierarchy" checkbox? Also check which properties the child objects are syncing with the parent (on the properties panel).

    I'm using the method you described heavily in my project and it definitely works.

    Thanks for your tips ! It works now :)

  • Have you tried the latest beta? They are doing a lot of work on Hierarchy, things like persist and Json are involved.

    yours

    winkr7

    Hello,

    Thanks for your answer :)

    Actually I did but I don't see anything changed

  • Id like to use a layout as a repository to design and store all of my complex game items. They are made of an Element sprite with a container filled with Objects sprites also connected to the Element through Hierarchy. Thus Element is parent to Objects.

    When I drag an Element in another layout, I see in the debugger that every Objects are correctly added runtime, put into the right container but everything acts as if hierarchy was broken.

    Am I missing something ?

    Edit :

    I managed to reinstore hierarchy using a test when layout is stored :

    On layout start > for each Element > pick Object where Object.ParentName = Element.Name > add child Object to Element

    It seems to me a bit complicated and I'm sure there's a better way to do this.

    Also, in new layout where just Element is dropped, Objects don't keep their position relative to Element that they have in Repository layout and are all created at Point.0

  • Another option is to add all these array into a family. Then you could pick family instance by name, using this condition:

    System Pick ArrayFamily by evaluate: ArrayFamily.ObjectTypeName=nameVar

    .

    You can also use a single array object with several instances - just like you do with sprites. Each instance will store strings for one language. Define an instance variable "lang" on the array and pick array instance by variable value.

    Hello dop2000,

    Actually, I'm updating your video subtitles template and try two approches :

    - use one and unique array and add to it a line for each different language.

    - use a array for each language

    I choosed the second one.

    It works perfectly, but I'm sure the way I did it is absolutly not optimised : I didn't manage to create just one SubtitleParse function and had to duplicate it 3 times for each of my 3 langages. I did the same for the Show Subtitles routine. For example in the following screencap, is the parse routine for French Language. With the red line in front, Arrays I would like to be able to pick for each language.

    My solution works, even if it is not optimized. I'll at yours :) it's a great lesson. Thanks

  • Hello

    In my game I'm using multiple arrays and I want to have them all processed with a single function.

    Here's hat I have for example :

    I have to process arrays named :

    - SubsArrayfr

    - SubsArrayBzh

    - SubsarrayEn

    In the expression, is there a way to replace "SubsArrayFr" by something like "SubsArray"&Variable, where Variable can be Fr, Bzh or En ?

    Tagged:

  • Thanks DiegoM, that would be great to add this and also have complete video control from timeline, including preview

  • Hi DiegoM

    I'm still on the project and try to make sprite position more accurate.

    I tried many ways to forward the video by adding 0.02 second to the playbacktime. It works when the video runs but I also would like to pause the video and forward it from still image to still image. Are there limitations that prevent this ? Do you have a solution ?

  • Done

  • 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

  • Try Construct 3

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

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

    I get it.

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

Laurent's avatar

Laurent

Early Adopter

Member since 18 Jan, 2012

Twitter
Laurent has 1 followers

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies