DiegoM's Forum Posts

  • Can you share your project? This sounds like an oversight of timelines, but I would like to check what is it you are trying to do to be sure.

  • I see what the real question is now :P

    What you need to do is run the simulation of time passing when you enter each layout/scene.

    To do that the first thing is keep track of the time when you leave a scene so you can calculate the time difference when you enter it again later.

    If you know the last time you where in a given scene and the current time, you can tell how much time has passed.

    Assuming everything is in the same place and has the same state as before you left the scene, you need to be able to tell each object in the scene to do all the things it would have done in the time that passed.

    Taking from your example, if you left a scene at 30 seconds after the game started, and came back to it 60 seconds after the game started, that means that you need to figure out all the things that would have happened in those 30 seconds, and make those changes.

    For instance, and to keep things simple. If a hen were to reproduce every 5 seconds, in 30 seconds there would be 6 (30 / 5) more hens that spawned from the original hen. If the original hen should move randomly every 2 seconds, it would have moved a total of 15 (30 / 2) times.

    That only takes care of the first hen. The simulation should also take into account what happens to the new objects that would have appeared during the elapsed time and what would have happened to them.

    All of this is easier said than done. I suggest you start real small and then build from that.

  • Try setting up a few layouts and some way to change between them. Then make sure to have a Text instance in each layout to display the result of of the expression.

    In your event sheet set the text of the Text instance to the time expression on every tick.

    You will see that no matter in which Layout you are the time is always the same in all layouts.

  • You can use the System expression 'time' which returns the number of seconds since the beginning. The value always progresses forward no matter when you call it.

  • Using multiple instances of the same flowchart controller is meant for the use case of coupling a flowchart with an instance in a container. So when you pick that instance by some method, clicking on it for example, you can control the flowchart associated to that one instance.

    That is how it's supposed to work, the reason it is confusing is because it is not working properly. This will be fixed soon.

  • Look into templates to solve this problem.

    In the layout view select the instance you would like to create at runtime, after making all the changes you want, look in the Properties bar for the 'Template mode' property and set it to 'Template', then set the 'Template name' property to some value of your choice.

    At runtime when you use the Create Object action, you can fill in the 'template' parameter with the value you used for 'Template name'. The new instance will take all the properties that were set in the editor.

  • The reason the hierarchy in the example previews transformations is because it is part of a Timeline.

    Timelines have a little bit of extra functionality to be able to preview hierarchy transformation while in editing mode, so it's a little bit easier to do an animation.

    When you are not in timeline editing mode though, the different parts of a hierarchy just behave as any other instance regardless of being on a hierarchy or not.

  • I am imagining that you are using the "on node entered" trigger to pick the value of one of the outputs of the current node at random and then you are showing that. The same can be done for the starting node.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is no such thing as a default output.

    When a node is entered you can query the node for the information in any of it's outputs and then decide what to do next.

    What are you trying to do?

  • Currently there is no specific way of checking if any given node is the last. Maybe in the future there can be a condition to check if a node doesn't have connected outputs.

    In the mean time the way to detect when a certain node has been reached is by using tags.

  • Yeah, Ctrl + Click is a shortcut to the color picker tool that works at any time, regardless of the selected tool. There are two unusual cases:

    1. When the image points tool is selected, the color swatches are not visible but the shortcut will still work.
    2. When the collision polygon tool is selected, the shortcut doesn't work, which technically is a bug, but since it's an unusual case, will be left as is.
  • You do not have permission to view this post

  • Hmm I see the issue with that. But realistically I'd still want the z-order to be somewhat retained in the sense of something being above or below an object. If all the objects in the hierarchy are then, z-order wise, right next to each other that's ok but I think they should be in the right order, so that a sprite that is above another sprite in the template is also above the other sprite in the replica.

    I need to check that then, because the relative z ordering in a hierarchy should be kept.

  • You mean changing the Z order by using the context menu option to send to bottom and send to front? Because yeah, that is not supported by templates.

    Right off the bat, I can see that there would be a problem with templates propagating z order to replicas if they are both in the same layer, what should be at the top or the bottom then?

  • I wouldn't wait for this to be implemented on our side, it could take a long time if it even is implemented at all.

    It's difficult to say what a good strategy to do something like what you are describing without seeing how your project looks like. Of the top of my head, you could try having a few families and use that as the mechanism to place the instances in the correct layer.

    Ej. after creating all the instances look for all the instances in the HUD family and place them in the HUD layer.

    Doing something like that for each layer should be convenient in the long run.