dsminor's Forum Posts

  • nice thx

  • Ok then you need to stick to the three blocks and just load the comments into them from an array(database).

    Thats totally possible with some math magic.

  • 90% of gamebreaking bugs are small things like a simple line of code.

  • I thought about a nice system but its a bit complicated.

    But i just got an easier idea.

    Every comment is a block in your script?

    So just count the blocks. Give them a variable called commentNUmber.

    And a global variable TotalComments

    on comment made add+1 to TotalComments and set the instanze commentNUmber to TotalComments.

    then make a new block at (x=360,y=859+(commentNUmber-1)*133)

    so every comment will create a block 133 pixel under the last block

    then if you klick the downarrow just shift all blocks up(-) 133 pixels.

    on uparrow shift them down(+) 133.

    So you can just "scroll" through them. No need for Pages.

    p.S:

    Its getting late my english is getting worse i am sorry

  • Hmm i dont see why the leveling shouldent work but what about the progress bar?

    How does it know what its maximum is?

    Also the maximum isent static, it changes with every level cause the

    formula is 100*Level*2.

    Have you checkt the numbers for level and EXPprogress in the debuger?

  • Hi,

    i really dont understand what your trying to do...so many comments

    What i did now:

    IF > commentCheck = 3*commentPage-2 > Do action

    IF > commentCheck = 3*commentPage-1 > Do action, Do Action

    IF > commentCheck = 3*commentPage > Do action, Do Action, Do Action

    your changing the formula here not the variable.

    The formula should stay the same you just need to change the commentPage variable.

    f(x)=3x-2 is a linear function you put a x in and get a f(x)=y out.

    Thats it.

    Never change the parameters (3 and -2) or you will get another function or even a cluster of function if the parameter is a variable itself.

    However.

    So maybe you should do something like that:

    on setComments:

    set commentCheck to 3*commentPage-2

    ...........if commentCheck=1--->do something

    ...........if commentCheck=4--->do something

    ...........and so on

    But as i said i dont get what your trying to do with this.

    It sounds like you just want to switch to a new comment page every 3 comments?

  • Hi,

    you need a variable for your n.

    So its 3*"variablename"-2

    Then everytime the event runs add+1 to this variable.

    (in fact thats exacly what you do in your mind with the sequences 3n-2 you add +1 to n on every run.)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes thats right i would put it in event 118 though, so the system dont need to loop all enemys ~60 times a second.

  • You could just post the .capx iam pretty sure its just a bug.

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