99Instances2Go's Forum Posts

  • I dont know how to easy clone a complete layout. Maybe by 'hacking' the layout XML's. Might be a case of 'search and replace'. But that is totally out of my league.

    Your goal is always producing a code, events, a script, how ever you wanna call it. Excuse me for anticipating on what follows on the cloning.

    In my humble eyes is a copy of a layout, and reusing a lot of the code preferable above a clone of the layout and having to recode everything.

    If you gonna make templates, my opinion is that you should use families and families only. That way you can very easy replace objects and keep kinda everything in place.

    Menu's are a lot easyer to do with 1 Global Layer, another tip.

    But hey, i might be wrong, and wayyyyyyyyyyyyyyy of a topic that started with UID's.

  • If you want to refer by its name, you need a clone.

    But. Why would you do that ? Refer by an instance variable.

    If you want to refer by name, the amount of events will outrun your live, you will have to re code each event sheet too.

  • If the array is 1 dimensional ...

    Array > for each element ... element = x

    .... Array > set at X .... X = Array.CurX .. value = whatever you like

    If the array is 2 dimensional ...

    Array > for each element ... element = x

    .... Array > set at XY .... X = Array.CurX .. Y = an index you want to store something on ... value = whatever you like

  • It takes a few seconds for 'it' to update the property text for UID. Why, i dont know. Give it a few seconds, and you will see that they have definitely different UID's.

    The name changing in both layouts is normal eh. Confusing remark.

  • Sprite > On frame changed

    ....... move pixels

    System > Every X seconds ..... time = random(1/12,1/60)

    ....... move pixels

    System > Every X seconds ..... time = 1/15

    ....... move pixels

    System > compare two values ... value 1 = tickcount%5 .. = .. value 2 = zero

    ....... move

    If you wanna use a behaviour

    System > compare two values ... value 1 = tickcount%3 .. = .. value 2 = zero

    ....... system > Set object timescale .. zero

    Else

    ....... system > Set object timescale .. 1

  • I can not open that truncated link.

    But, this is (one of many) a simple way to do this.

    https://www.dropbox.com/s/i2pua0anoyz5p ... .capx?dl=0

  • Right click the layout in the project three, choose duplicate.

  • Yes at in the middle.

    Suppose you need 2 black sprites in a top layer to mask the margins.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Set layout to unbound scrolling. Set layer to parallax. Use system action 'Scroll to position', position is middle of the layout.

    ?

  • You can use that .json to feed the action 'Set character width' in a loop.

    Dont ask me how to parse that json in an array, i have not done that yet. But i guess it is a bit like this.

    https://www.scirra.com/tutorials/978/ex ... -game-card

    No need to replace them then. Unless there are other reasons to do so.

  • The resolution (in distance travelled) you can measure, say at 60 fps and with that speed of 330 pixels/second, is like 6 pixels.

    So, on the moment you measure that x, the object made an overshoot of between 1 and 6 pixels. And then you send it back 6 pixels.

    Back 6 pixels? Ah yes, because the next moment that you can measure it travelled at least 6 pixels. Well, probably 4 due the acceleration.

    So, next tick, same thing happens, it just overshoots on the other side, and now it oscillates between two overshoot positions.

    Besides that. When you stop emulating/pressing the key, the deceleration kicks in,

    well at 5000 pixels/second that is not that much extra distance travelled, guess you got that one.

    https://www.dropbox.com/s/1la0xish5b3e3 ... .capx?dl=0

  • Hope you experimented in last 5 days. Instead of only bumping.

    Here is my experiment.

    Since you are not sharing a starting position, i gambled that it is gonna display an array. Made that easy for you.

    https://www.dropbox.com/s/ohcn07068c8p0 ... .capx?dl=0

  • Why dont you just write in events what you think ?

    https://www.dropbox.com/s/faxsqtisyypfl4f/ntr.capx?dl=0

    Dont give me hell for the search time for completely locked up tiles. You was warned.

  • They have no free spot on a vert or hor position.

    Cross the two 'loopindex("..") = 0' conditions in event 11 to have the diagonals available.

    That will also mean that they are taken into account when calculating/choosing the shortest path.

    Up to you if you like that or not. The results are very different. I did not like it at all in a example that i made.

    Also, it will be slower. In the end, when you dont limit the search tree (and that is ALWAYS true), you end up checking to many possibilitys.

    It is not a case of finding the shortest available walkable tile to the click position, that is pretty easy, you can do that on your own.

    The case is to find the shortest available walkable tile that can be reached.

    So, if you got a clickable tile buried deep down, and you want to check for every walkable tile arround it (dont matter how far away) if it can be reach and if it is the closest reachable, your search tree goes deep and exponential in amount of choices.

    But that is up to you eh.

    Now it checks just hor and vertical (4 tiles) in a simple loop. Whatever loop you want to choose will work (in exponential longer ticks).