99Instances2Go's Forum Posts

  • I assume that you have some Seating with direction=1, some with 2 and some with 4. (read this twice, because it is as simple as that)

    You read the conditions wrong.

    Look at event 424. It does not state 'IF seating.direction = 1 THEN do those actions".

    It states: 'Make a picklist containing all the seating with seating.direction = 1', apply the actions on the picked seating, or do not run the actions at all when the condition is not true (in the case of picking, the condition is untrue when the constructed picklist is empty)

    Construct is mainly about picking.

    'Or' is a logical thing. It does not work work as you expect it to work with picking items. (read the first line again). Use it only if you intend to use only the logical part of the conditions. (until you understand picking)

    Else is a a logical thing. It runs when its parent condition did not run (is untrue). So when there is at least 1 seating with seating.Direction = 1, the else will just not run.

    All together now. Why is this totally weird construction not working ?

    Event 423.

    Make a picklist that contains all customers that overlap any seating, plus containing all the Seating that overlap any customer. De picklist now contains some customers and some Seating.

    For all following sub events, this is the picklist where they start picking from (their previous picked list).

    Event 424

    Pick from the previous picked list those Seating with Seating.Direction = 1

    Move those (actions only address to picked items) to the top of their layer.

    Since the picklist for the customers is not refined, the picklist still contains all Customers picked in the previous made pick list.

    So the action moves all the Customers (those that overlap a Seating) to the bottom of another layer.

    Event 425

    When its parent condition ran, the else will not run. One can safely assume that there is at least one Seating with Seating.Direction = 1. So, in fact, we dont even need to investigate event 426.

    Event 425, again.

    But say, there is not ONE Seating with Seating.Direction = 1. Then 424 is untrue, hence it will not run. And the else will run.

    At this moment we start again with the picklist as picked in event 423.

    Event 426

    IF (OR = LOGIC) there is at least 1 Seating with Seating.Direction = 2,3 OR 4, this OR-construction will run.

    The picking in this event starts then picking from the previous picked list (in 423) and picks from that previous picked list the Seating with Seating.Direction= 2 AND 3 AND 4.

    The actions move those to the bottom of the layer.

    Since the picklist for the customers is not refined, the picklist still contains all Customers picked in the previous made pick list.

    So the action moves all the Customers (those that overlap a Seating) to the top of another layer.

    So as you see, there are two BIG errors in this construction.

    1/The else will just not run in most cases.

    2/And the picking for the customers is just not refined.

    Do this.

    Seating.Direction = 1 ? (pick those Seating)

    Customers = overlapping seating (pick the customers that overlap the previous picked Seating)

    _____ Actions ... do that thing with layers and stuff

    Seating.Direction not= 1 ? (pick those Seating with Direction not equal to 1)

    Customers = overlapping seating (pick the customers that overlap the previous picked Seating)

    _____ Actions ... do that thing with layers and stuff

    Wish you had read 2 of the links that i provided you for your first problem. You would have understood 'picking'.

    Dissapointed greetings.

  • You do not have permission to view this post

  • Add a global variable 'GodIsaDJ' (text)

    Make a empty sub event under event 1

    Now, in that empty sub event make an action that sets 'GodIsaDJ' to the choose expression that you have in place.

    In the second action you can Play (by name) with name = 'GodIsaDJ' and tag = 'GodIsaDJ'

    Event 2 i dont understand. You can keep it as it is, if there is only 1 animation to play. Just dont have that animation in loop.

    If there are as many animations as songs. May i suggest to name the animations the same as the song.

    Now event 2 will be ....

    Is tag playing ('GodIsaDJ')

    _____ set animations to 'GodIsaDJ' (dont have that animation in loop)

    Audio should have an Audio.tag expression to go with 'Is any playing'. But it does not.

  • Say, this '1.0'

    1 is a value on (0,0) ?

    0 is a value on (0,1) ?

    or '2.10'

    2 is a value on ((1,0) ?

    10 is a value on ((1,1) ?

    or does the 2 in '2.10' just stands for the X index and 10 is the value on that index ?

  • Audio plugin has a 'Seek to' action.

  • Not first, all the variables only in the array.

    Say you have the variables .. (that you would make into globals)

    var1

    var2

    var3

    Now

    You can make it yourself easy, if you want to. Make a new event sheet. Call it "Indexes". (dont even need to include it)

    In that new event sheet "Indexes" add the following globals.

    global var1 (number) = 0

    global var2 (number) = 1

    global var3 (number) = 2

    Now storing a variable to the array (if the array is big enough) goes like this.

    Array > action > Set at X > ... index= var1 (the global in the other sheet) ... value = what you wanna store

    To use a value in the array, use its expression

    value = Array.at(var1)

    Now you can sort as i showed you.

  • Take a piece of paper. And a meter.

    Now lerp it like you do.

    Measure and cut of 20% of the length. (distance gets shorter) and keep doing so until the end of days.

    What happens in the end ?

    Add a distance check to the lerping. When the distance-to-go is less then (lets say) 4 pixels, dont lerp.

  • Works perfect in a simple version. So must you seek it in the events. Something that runs in the start up maybe ?

  • Yeah, my english.

    The landing you have to predict. Close to this, with a timing depending on the animation.

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

    Again, dont break that animation by kicking in the idle animation (or others). Those can not be allowed as long as landing is playing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • You have an animation "bend".

    You have the controls for the platform behavior set on 'custom '

    Assuming you press arrow up to jump.

    In base you want to delay the jump. And we gonna use the animation "bend" to accomplish this.

    So.

    On key (up arrow) pressed

    ____ set the animation to "bend"

    On finished (animation "bend")

    ____ Simulate control (jump)

    Be aware that you have to cage the other animations.

    So where ever you start the another animation .... add the condition 'Is playing ("bend") <---- inverted.

  • Excuse me for the guessing game.

    Are they maybe global ? Do you have the same amount of objects after and before returning to the layout ?

  • Whatever suits you best or better is fine for you. Just have to watch performance.

    This would be the direction that i would go.

    At this moment simple, but as the tech tree grows, i will bring the whole tech tree in a lookup table.

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

  • Variable as name is no problem.

    Use Play (by name) ... name is any basestring & variable converted to a string

    Rename the file to a basestring and a number.

    You can also use a lookup table. If you dont wanna rename the files.

    That is an array with on the x index (index = variable) the name of the file stored (as a string).

    Use Play (by name) ... name is = Array.at(variable)