99Instances2Go's Recent Forum Activity

  • Just to clarify what 'the next top-level event' is.

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

    Event 5 is, compared the event 3, the next top-level event.

    As you see, Node is perfect pickable at that point.

  • You can not Pick (select) Node yet at that point.

    Newly created instances are selectable in the next top-level event. On creation acts as it is in the same event and on the same place as the creation/spawn action. So, it does not count as a top-level event.

    The same is true for functions.

    But. There is 1 pick event that always works, no matter where or when you use it. And that is sprite > Pick by unique ID.

    So this is how you can do this:

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

    What is the top-level event ? It just the next 'non sub event'.

  • Question.

    Is Unit created in the same tick as Node ?

  • Note:

    LiteTween, a 3th party behavior, can do all the lerping one wish to do.

    That way you can avoid actual lerps.

  • Second layer is not transparant. Guess you missed that.

    Yes, i got this about the 'moving' characters. In fact i still think it is gonna be a lot easyer with animations, even if they have allready animations. That way you only have to start an animation and dissolve background layer in and out. I can do that 4 you, if you wish, make for every animation a version that dissolves to its invert state and back. (i dont charge)

    About the lerp. Every lerp is the same. lerp(a,b,step). Where 'step' is just a number between 0 and 100. When 'step' = 0, the lerp returns a. (0% between a and b) When 'step' = 1(100 % between a and b) it returns b. When 'step' = 0.4 the lerp returns a value that is 40 % between a and b.

    So all you need for a perfect lerp is a start value, a end value and number that counts from zero to 1 over some time.

    But lerp (as all very basic things in construct) is not dt corrected. And it should be. Else 3 seconds is in fact 3 seconds on a fast device but like 6 seconds on a slow device.

    Also, lerp has no 'on arrived' conditions. Its not that easy (for me) to know during run time, when it is done with its magic.

    And here comes the timer behavior as a perfect soulmate. It is dt corrected. And you can do 3 major things with it.

    1/ It is private. Meaning, every instance can have its personal timer.

    2/ De moment you start a timer, you can read where it is at the moment by reading its expression Sprite.Timer.CurrentTime

    3/ It warns us when its done using the condition 'on timer'.

    So in the example i made, i start a timer (since you stated that the dissolve has to take 3 seconds) for 3 seconds. Now the expression Sprite.Timer.CurrentTime returns a number between 0 and 3. Since it goes from 0 seconds to 3 seconds.

    But we need a number between 0 and 1. Not between 0 and 3. So all we do is lerp(100,0,Sprite.Timer.CurrentTime("steps")/second) to archive that.

    100 = opacity 100

    0 = opacity 0

    "steps" is the name of the timer, you can have more timers (one that accounts for the pauzes for ecample)

    Sprite.Timer.CurrentTime("steps") counts from 0 to 3 in exact 3 seconds

    Sprite.Timer.CurrentTime("steps")/second counts from 0 to 1 in exact 3 seconds

    Back to dissolving from non-inverted to inverted. When that is the way you want to go, then you always need a copy of the character running arround. To dissolve to and from. Gonna be kinda hell to code. Why i think animations are a much much easyer solution.

  • Allow me to make a wild guess, all in the mind of: Could it be the case that .....

    So ... could it be that you started with solid rocks and the pathfinder on default obstacles: solid. Then you changed to custom obstacles. Added them in the 'on start of layout', and it worked.

    Well somewhere (on a dark place where i can not bring my dull brain) there is a obstacle map. And there is only one. Meaning, it is not private/instance or object. This map is catched, for performance. So when you (in the could it be that case still) changed to custom obstacles, this map was still catched by the browser. But that did not rest that long.

    Your current (the one shown above) events can not work at all. Because you forgot to use the action sprite > pathfinding > Regenerate obstacle map directly after adding the obstacles.

    Dont forget: if you move a rock. You should use 'Regenerate region around object'. And find new paths.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Very disappointing response.

    And no, it does not work correctly.

    Works correctly. Background and Foreground are meant (coded to) to shift.

    This way, a wanted and very very welcome effect of depth is archived.

    You dont want this ? Set all parallax the same.

    And maybe have a look

    https://www.scirra.com/tutorials/1027/p ... -scrolling

    Still dont understand?

    Forum is filled with good help arround parallax.

    https://www.google.be/search?q=scirra+l ... scirra.com

  • With this plugin, you have expressions representing the max/min value, without having to sort.

    Also, filling the array is awwsome simple.

    On top you can make/delete an array, and therefor have not to worry about the dimensions.

    Just a suggestion.

  • Have to pick spider that goes with the box. 1 way to do this is use containers. But that means also that you have to create spider & box during runtime.

    Another way is to just give spider & box a identification number (or string). Those with the same identification number are a pair.

    Like this:

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

    I gave spider & box an instance variable 'ID'. In the layout editor i gave them matching numbers.

    Now, if you pick one, you also pick the other.

    As in event 3, where i pick each box, and at the same time the spider with the same ID as the box. Now the right spider gets set to the position of the right box.

    As in event 20. Where the 'on collision' auto picks a box. And i pick the spider with the same ID. The action of the box is updated, and the mirroring of the spider with the same ID is updated.

  • I think the easy way is to it let make the index by it self. To do that use Array > action > Push.

    If you do that, you have 2 options.

    Option 1: Start with an empty array. (dimensions 1,3,1). To let it fill the array with an unlimeted amount of mouse coordinates.

    Every tick

    Action > Array > Push ... X axis .. value dont matter ... front

    Action > Array > Set at XY > X=0 .. Y=1 .. value = Mouse.X

    Action > Array > Set at XY > X=0 .. Y=2 .. value = Mouse.Y

    Now the array fills, with the latest coordinates at index X=0

    Option 2: Suppose you want to store a limited amount of mouse coordinates. Lets say 2000. Then you start with an array with dimensions 2000,3,1.

    Now.

    Every tick

    Action > Array > Push ... X axis .. value really dont matter... front

    Action > Array > Set at XY > X=0 .. Y=1 .. value = Mouse.X

    Action > Array > Set at XY > X=0 .. Y=2 .. value = Mouse.Y

    Action > Array > Pop > X axis ... back.

99Instances2Go's avatar

99Instances2Go

Member since 12 Feb, 2016

Twitter
99Instances2Go has 2 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies