99Instances2Go's Forum Posts

  • Look better.

  • if it can be only 1 or 0, an else would be a better choice.

  • Someone pointing you in a (one of many) direction.

    https://drive.google.com/open?id=0B1SSu ... GRyTTNWTVE

  • Assuming Variable = a string and a global

    + One more global variable containing the basestriing ... lets call it 'Base'

    Condition > System > for ... name "index" ... start any ... end any

    Action > System > Set Value .. Variable=Variable .. Value = Base&str(loopindex("index"))

    str() converts a number to a string

    & is the operator to combine two strings

    loopindex(name) = the loopindex of the 'for' as an expression

    I probaly understood the question wrong, i dont see any use in setting a variable this way in a loop. A whole loop happens inside 1 tick.

    I you want to add 'x' to variable every tick. Then you just use the tick loop.

    In this case you need a globale 'counter' (wich is a number)

    Condition > empty or > System > Every tick

    Action > System > add to > Variable = counter .. value = x

    Action > System > Set Value .. Variable = Variable .. Value = Base&str(counter)

  • Need 391 instances of the same sprite, if you wanna do it basic.

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

    Drawed his way, rexrainbow 's board plugins are a big help for you. After all, its just a regular board.

  • Excuse me my stupidity for not seeing that this is a post in 'Classic'.

    Question. Does this lags ?

    https://www.dropbox.com/s/tg4gxdd1zvado ... s.cap?dl=0

  • Thanks, because dpads are very small in general, so I wanted to extend the range of moving, by moving potentially all across the screen, once the user started touching the dpad.

    Okay, this i understand, so you want the index of the touch when the dtap is tapped, set a boolean to know that it is tapped, and unset the boolean when that the touch of that index is taken away from the screen.

    Als long as the boolean is set, the ship moves.

    At the same time player can tap (or hold ?) anywhere on the screen to fire bullets.

    I did not understand purpose of the events as showed in the first post.

    I try to make a capx later, if no one else did it b4 me.

  • Making them solid is not the problem.

    To many collissions checks / tick will bring performance to its knee's.

    First a little explination. If you write a line of code in Construct, that is not actualy the code. Each line of code in construct is in fact a little program. So, if you write 'on coliision with astroids', you wrote a program that loops trough each astroid and checks if it collides with your ship. And thats a heavy calculation, for ALL hundreds of astroids.

    To keep this under control you must include less asteroids in the calculations. One way to do this is ... with 'pick nearest'. A condition 'pick nearest astroid to the ships position' combined with (and in that order) a condition 'is colliding with ship'. If the asteroids are to close to each other, this will miss some collisions. But is blazing fast.

    An other way is to 'pick by comparisation'. Expression = distance (astroid.x,astroid.y,ship.x,ship.y) .. object is astroids ... value is lets say 150 (depending on the size of you layout). Combine that again with the 'on collision with'

    What happens is ... it again will loop trough all astroids to test that distance, but without checking collision. And that is a speedy calculation. Now it picks all astroids that are 150 pixels away from ship. All the others are not picked. And the collission condition will only check those (close) asteroids for collisions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That, and set the animation speed on zero.

  • Amount of steps (before you make any new) is the expression steps.count.

  • kantin,

    The issue is with the updated "Box2D asm.js" not being compatible with CarPhysics behavior (v0.1).

    In order to run the tutorial successfully in newer Construct 2 revisions (including r210 beta), just close the "SideView_Car_Physics_0.1_tutorial.capx" project (if you have it opened) and then open it again *but* do not preview it just yet.

    Change the "Physics engine" project property to "Box2D web" instead of "Box2D asm.js". This option can be found by clicking the folder name "New project" in the Projects tab (within the Project Bar view). Now you should be able to preview it.

    By default Construct 2 only loads runtime scripts when previewing a project for the first time. So if you previewed the tutorial first before changing to "Box2D web", changing it later doesn't help, as the previous runtime scripts are not updated -- unless you close the project and open it again that is.

    EDIT: This wasn't a problem for C2 revisions 196 and below.

  • Wait will not pauze the tick. It just postpones the actions in time, the events that follow just continue to run.

    "Wait 0 seconds" is SPECIAL, it postpones the following actions until the end of the event sheet.

    There is a wait before the function call. So the system sets the function call aside and runs some ticks. Then, when the wait (0.2 seconds) is over, it calls the function. There is no way to know exactly at what point the tick is now in the events.

    So, the function gets called, denominator gets a new value. And it this point, due the first wait call, the events have been on the end of the tick. So mostly num1, num2 and result get a value.

    I think the while loop can try like 4 or 5 times, then it all get caught up. If it dont guess more then 4/5 times it will probaly work, it has been a some times at the end of the events during the wait before the function call. But after that, the event ticker is caught up in the while loop, because it runs that while loop. And when the 'result' is illegal, it can be bigger then any denominator can be. But now, the event sheet wil not be at the end anymore, the moment where the waits postponed the actions. So, denominator gets a new value, but num1,num2 and result will never again get a new value. So the while keeps gooing. And thats a endless loop = a non responsive game. Or as you say = a crash.

    Solution = Do not use 'waits', use timers.

    The waits in the function are totaly not needed.

    edit, they gave you that solution allready, i see.

    restart the browser, it will work

  • He will not have the same problem (that problem he creates on that right click) when coding that example in that picture. See that 'enter here' ? The ball will aproach from the outside of the trigger, not from the inside .... and then collide at a miljoen times/tick. So its all ok, and guess its solved by a new game logic.