99Instances2Go's Forum Posts

  • I still perceive the cursor movements as disturbing.

    In GTA, i beleive, the aiming cross is not acting as a cursor. I beleive that it is not locked to the mouse. Also the aiming cross dissapears when bringing up the wheel.

    I think (just an opinion as so many) if you see the aiming cross as 'the direction it will shoot to', things will get easyer to archive. Then the aiming cross can move on a fixed circle arround the player. Effectively show direction the player is shooting towards. Now it is easy to snap that aiming cross back to that place after un-showing the wheel.

    The aiming cross is (in my eyes) not needed to make a selection in the wheel. (see my example). With that cross hopping arround, that HUD gets to complex.

    Using the mouse wheel would be the most natural way to choose, but, on 'touch' thats not gonna work.

    So maybe, if you wanna do this on 'touch' too, why not use the actual 'touch'/'mouse' to choose from the wheel. And use a controlled aiming cross to represent the direction that one shoots to.

    Just mumbling, dont mind me.

  • Yesh ! Or two squares, or 3. Saw you wanted to animate the tilemap, wich is btw a very good idea, if you ask me.

    If have not idea if you can do it in a 'range'. Just suggested it.

  • Still not as fast as ... if you can do it with Tile > Set tile range.

    But thanks for the JSON string.

  • Are you perhaps making a platformer? Instead of a physics game ?

    Start up Construct 2. Choose New in the file menu. Now you have a list with templates.

    Look for the template 'Platform 6 (slopes & moving platforms)'.

    It explains how to 'stand' on a moving platform (using sine behavior).

  • Okay,

    so you are in the layout (tab),

    you open the Z order bar from the ribbon (or you have the z order bar pinned),

    you switch to te event sheet by clicking its tab ....

    Now the Z order bar is showing the objects.

    Wich is, i agree a bit confusing. Althaught i never used it that way, so it never botherd me.

    Now, when you try to change something in the Z order bar, the Z order bar goes empty. No object dissapears, the Z order bar just shows empty. Wich (mayby just maybe) should have happend (to avoid confusing) on the moment that you switched to the event sheet (by clicking its tab).

    It is really not needed to change Z orders while working in the event sheet. I never had the need to do that. Just like i never had the need to place tiles from the tile bar into the layout when working in a event sheet.

    My 2 cents.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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