99Instances2Go's Forum Posts

  • No, i a wrong, its only the picking. I used an 'else' where not applicable.

    Correcting myself:

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

  • You have 2 little problems.

    1/ You did't pick. Compare two values does not pick an object.

    2/ You are right that (even with picking) the logic will not work. As far as my little knowledge goes, this is due the 'deceleration' component. When it 'stops' at solids, it is still decelerating. The push-out-of-solids routine inside the platform behavior is placing it outside the solid, but the actual vector is still decelerating. Fix in the capx. (and no, i dont like the behavior working that way)

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

  • Very appealing.

  • You do not have permission to view this post

  • Again. According your comments, this should be totally not possible.

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

    Yet, i have 8 instances of the same objects & 1 extra object with differed obstacle maps, finding a legit path.

    They, again, just wait for the obstacle map to be build.

    (not that i like the paths at all)

  • Fade behavior has a nice timer.

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

  • But its not really important regarding the obstacle maps and how they work I think.

    Whatever.

  • Uuhhh nope. I do need to recalculate the maps. Because, you obvious did not notice, right/left click is changing the tilemap. And there for the obstacle map.

    Again, it just waits till the obstacle map is ready before initiating a 'find path'.

    (although i have to admit that i cheated on the concept: hard to press right/left click on the same time)

  • nimos100

    Explain 2 me why the capx that i posted in the topic that you linked to is working flawless.

    Ty.

  • I would ...

    Add a instance boolean 'Solved'.

    Besides the instance variable 'Frame2Solve' (number)

    Then

    Event blok 1

    System > For each Sprite

    Sprite > Compare frame .... = ? .. 'Frame2Solve'

    _________Sprite > Set boolean 'Solved' to true

    Event blok 2

    Sprite > Is boolean instance variable set 'Solved'

    System > Compare 2 values ... Sprite.count ... =? ... Sprite.PickedCount

    ................................. Actions ... if true ... things are solved/

    Additional:

    The first event block is not needed IF you set the boolean 'Solved' on the moment that the player solves a frame.

    Better for performance.

  • I did not 'solve' anything for you. I see you say in another topic:

    Basically, I was just doing a ship tilting animation when pressing arrow keys left and right and I wanted it to animate back when the arrow key was released. I coded something with variables that works flawlessly while breaking up the 29 total frame animation into individual frames linked up to a specific variable (my way of keeping track of the frame number).

    A 'while' & 'animation frames' dont match. Simple because a 'while' always happens in 1 tick and 'animation frames' happen over several ticks.

    I suppose you want to play some 'basic animation' when the 'tilting animation' returns to its 'zero' frame.

    Set the 'basic animation' to looping in its property's.

    Now all you need is:

    Sprite > Is playing 'tilting animation'

    Sprite > Compare frame .. = 0 ?

    System > Trigger once while true

    ______________ Sprite > Set animation .. 'basic animation'

    If i understand what you try to do.

  • General flow :

    Set premise to false

    While

    Test premise

    .......... change something

    .......... test change

    ........................... set premise false or true based on change

    But in your case, chances are that you dont need a 'while', if we speak about a 1 dimensional array.

    Array > Contains value 'value'

    ................. in the actions the index of that value is stored in the expression Array.IndexOf('value')

    Otherwise.

    Local variable 'counter' ... number .. = 0

    Local variable 'check' ... number .. = 0

    While

    'check' = 0

    _______ Array .. Compare at XY ... x = counter .. y = say 1 ... compare to what you wanna compare

    _______________Set 'check' to 1

    _______System > Compare 2 values ... counter ... is the same as ... Array.widht - 1

    _______________Set 'check' to 1

    _______ System > Every tick

    _______________add 1 to counter

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • for each x element

    every 1 second - set value at (array.curx , 1) to array.curvalue - 1

    timer = true

    Value at(a,b) implicates that this is a 2D array. With index a on the X axis. And index b on the Y Axis.

    For each element x ... runs trough all indexes on the X-axis. Meaning the array.curvalue contains a value stored on the X Axis (only).

    So, yes, you store on each each index 1 on the Y axis ... for each index on the X axis .. the value that is stored on that X axis.

    Rather.

    I like to recommend a global variable to remember what the Y axis is meant to be.

    Say Global variable 'Counter_Y' (number) = 1

    Every 1 second

    System ... For "index_X" .. from 0 .. to array.width - 1

    ______Array ... set value at (loopindex("index_X" , Counter_Y) to Array.At(loopindex("index_X" , Counter_Y) - 1