dsminor's Recent Forum Activity

  • WIll i get a cake if i solve this?

    btw i really like the artstyle.

  • Its interesting so a local variable is created and destroyed every time the event runs instead of being simply

    reset to its starting value?

    So it will take up no memory while the programm is running other events?

    Makes kinda sense for optimization reasons i think.

  • So you mean it only resets if the event is triggered?

  • Hi,

    chrisinfinger is right you only need ONE object called arrow/bullet with different animation frames and an instance variable called colors/typ.

    Thats much easier than having an object for each different arrow.

    It doesent work because the curent value is not 0 nor 1 or 2

    The current value is the content of the cell NOT the x-coordinate.

    Also current value only works in an loop.

    (It is the content of the cell which is actually accessed in the "for each element loop".)

    You need someting like that:

    on touch:

    spawn bullet

    set bullet color/typ to array.at(0)

    pop front

    Imagen your array as a bullet clip full of colors...you shoot the first one and the second is then becoming the first one and you shoot it again. The position you shoot from is always the first but the colorbullet in it changes..

  • Hmm no its not on every tick ?

    Isent the event triggerd ones per tick and the variable therefore reset every tick?

    I cant see why and how the scope of the variable should change this.

    (Maybe we have a different understanding of "scope")

  • What he wants to say is local variables are only used in their event (and subevents below it) and reset them self every tick.

    So no it will not stay at 1 and cause the event to never run again.

  • or because you just want one condition triggered not both after each other.

    it is like

    main

    sub

    sub

    but it should be like:

    main

    sub1 sub2

    Anyway the variable works just fine.

    (I just call it or i dont mean the construct 2 or function)

    Maybe your right its more like an else chain:

    if a is true than "do something" else check if b is true than "do something" else check if c is true and so on...

    however its a bit offtopic here

  • There it is thats why you need triggers in construct 2 or an "or" function!

  • Sounds like a bug in the code not like a logical problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    you need an 1d array (a list) for this.

    Just fill it with colors and on every shoot take the first color for your shoot and then "pop" the first value.

    You could also use the 1,2,3 value to show whats coming next.

    Also do you want to set the list manualy for each level or make it random?

  • Maybe but it doesent matter.

    Thats why you trigger the scoring by the on destroy event.

  • Ok then the hardcore way.

    on collision--->destroy the finishing line!

    finishing line on destroy---> get score and end level

    It can only be destroyed ones so it can just trigger ones.

    The levels ends anyway so you dont need it anymore.

dsminor's avatar

dsminor

Member since 25 Jul, 2015

None one is following dsminor yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies