99Instances2Go's Recent Forum Activity

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

  • Like this ?

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

    Watch out with things like that second event. It can not overlap door 1 AND door 2 at the same time, so that can never be true. And it can not (visual) jump to the 2 places, only the last set position you will see happen.

  • Pick by comparison picks when the expression meets a value (value = expression, expression = value)

    Pick by evaluate picks when the expression returns a true (boolean), or a 1.

    Pick by evaluate wil not pick when the expression returns a false (boolean) or a zero.

    Wich one to use ? In fact they are the same, just differend ways of inputting the expression/values/evaluaters. Besides that the Pick by evaluate can also handle OR's, well any expression that returns a false/true or a 0/1.

    Example. Pick by comparison with a expression : sprite.x and a value 500 and the evaluator "<" is exactly the same as a Pick by evaluate with an expression : sprite.x < 500 (returns true when met, false when not)

    But Pick by evaluate can do much more, see example in the manual:

    Object.X > 100 & Object.Y > 100) | (Object.X < -100 & Object.Y < -100

    | means OR. & means AND

    But Pick by evaluate can also test instance variables in the form of a boolean.

  • There is also a dedicated plugin for cars.

    Probaly suits you more.

  • You still cant spawn it middle in that object and have that condition that goes for collissions with that object. Spawning will not solve that. I dont know what you want to do with it, makes not sense to me. This is why i can only say something negative. Something positive, as in solving your problem, i cant. I dont like that myself, sorry.

  • Same thing Zebbi (in my eyes), i see always the Two Same Things.

    1/ A lot of poeple doe things like this, for example. In the first event they check if something moves right an some other condition. If true they set it to move left. In de next event they check if it moves left (forgetting that in the previous event they made it move left)

    So, they make two events in a row, and the first event makes the second always true.

    2/ At the same time (especialy in OR blocks) they pick some objects. In de next (same level or sub level event) they filter those picked items in a way that the condition is true, but there are no objects left in the picklist to feed the actions.

    It is usaly not a case of construct having a flawed event system. It is usaly not carefully coded. In a lot of cases you are better of with two seperatly events then with an or block. The or is mostly lazy coding, because you dont have to duplicate the actions. Althaught, less event should be encouraged, i know.

    So, in my opinion, allowing ANDs in an OR block will get even more poeple confused, when they seem to be confused allready. But i am guilty too, i still fall in those traps. I dont need more traps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My example was correct. It is you who does not understand.

    Your ball cant act as a ball, it has square colission polygones.

    You move an object middle in an object and then 'on collision' with that object you want to do something. I have now idea how this can result in something 'physical'. Other then generating 'black hole forces'.

    You dont move it with physics (That would be ofcourse inpossible) In reality, in a world ruled by physics, when i magicaly and instantly move a tennis ball middle into you brain, what would happen ?

99Instances2Go's avatar

99Instances2Go

Member since 12 Feb, 2016

Twitter
99Instances2Go has 2 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies