maxwell88's Forum Posts

  • hi, how do i condition when user run first time game layout should not display load button (because load state dont exist)

    but when user save state during game and reload game on menu load button should be visible ?

  • bump

  • I read all tutorials about monaca, intelXDK

    why is so dificult to create secret/certificate key? Everywhere its a condition

    is possible to export to IOS and install game on iphone easily?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here's an example using a function. In the example I call the function at the start and on any mouse click (the mouse click also randomises the widths of the sprites to simulate the sprite widths changing during runtime) but you can call it whenever you need to in your project:

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

    good work <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

  • dropbox.com/s/keya08japv65wl4/totalwidth.capx

    Two ways, both work.

    ok, now its possible to change width in real time not only at start?

    because in my game, sprites should have posibliliy to change width size by user

  • It can be either.

    i make something like that, unfortunetly dont works

    dropbox.com/s/c45rknmx4b99vi6/Zrzut%20ekranu%202017-04-23%2022.21.12.png

  • Its one object like in my attached capx

    I try fix this when i return home

    Are all the sprites one object or iseparate? If it is one object you can use a loop and a counter.

    First set CounterVariable to 0.

    Repeat Sprite.Count times - Add Sprite(loopindex).Width to CounterVariable.

    Make sure the loop runs by trigger and not every tick.

    If they are separate objects you should be able to do the same thing with family.

  • Hi maxwell88 one way might be:

    Create a global variable e.g. totalWidth

    Put all your sprites in a family e.g. allSprites

    Trigger once:

    >>System|For each allSprites: System|Add allSprites width to globalwidth

    >>Set text on text object to globalwidth

    Something dont work well, even if i add trigger once, variable counts every time to infinite

    take look at capx

    dropbox.com/s/ycyjvyviju9n3 ... .capx?dl=0

  • hello,

    how in text obiect display sum of all sprites width in game?

    for example when i have sprites

    A - width 10

    B - width 20

    C - width 50

    etc

    text object should display 80 ?

  • I would just use the line of sight behavior.

    better for performance is use that behavior?

  • Hi

    when my Player sprite is close to block sprite (less than 100px)

    and i click on box > box destroy

    but when player is far (more than 100px)

    clicking on block do nothing?