dop2000's Forum Posts

  • Creating an object from many pieces connected with joint will be a difficult task. And the joints may not hold.

    It's easier to destroy the original object and spawn a bunch of pieces in its place. Here is a demo:

    dropbox.com/s/lyrnh9od24ewsix/Physics_destructibleBlocks.c3p

  • If there are no "Waits" in the function, then it's executed in the same tick. If the function call is the last on the event sheet, then after this function is finished, the tick will end.

    The event sheet will run again from the top at the start of a new tick.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, you can't add objects to a family in runtime.

    You need to add all monsters to Monsters family, and define "isEnemy" variable on the family. This way you will be able to easily pick friendly or enemy monsters in the game.

  • ((Car.MoveTo.MovingAngle+355)%360)/10

    I'm not sure this formula is correct. It will return frame 0 if the angle range is between -5 and 5. However, when the moving angle is between 5 and 15, the frame needs to be 1.

    I think this should do the trick:

    Car set frame to round(((Car.MoveTo.MovingAngle+360)%360)/10)%36

  • Yes, I think so. You can create a separate value for radial recoil and use a different easing expression or maybe Tween to change it.

  • OK, thanks, the code on line 2 you posted, which condition are you using?

    "System Is Within Angle", it's a similar condition to "Is between angles"

    And what do you mean with (36-loopindex)? Do I need to add that literally to the action as: Set animation frame to: (36-loopindex)

    Yes, but I don't know if this will be a correct expression in your case.

    Oh and, is this code for 36 frames or 360? I'm trying to understand why you use 5 degrees, and use multiply loopindex by 10.

    It's for 36 frames. I loop in 10 degrees intervals from 0 to 350 degrees - 0, 10, 20, 30 etc. And for each interval checking if car angle is within 5 degrees of it. For example, for loopindex=8 it will check if car angle is between 75 and 85 degrees.

    .

    If your animation has 360 frames, then you can simply set frame to moving angle value. But you will need to convert it to positive number:

    Set frame to (Car.MoveTo.MovingAngle+360)%360

  • Move "Set angle" action from event #10 to #11

  • You can do it in a loop. For example, if you need to check in 10 degrees intervals:

    Repeat 36 times
     Car.MoveTo.MovingAngle within 5 degrees of (loopindex*10)
     	Car set frame to loopindex
    	Stop loop
    

    I don't quite understand how the animation is made in your case, so you might have to set the frame to something like (36-loopindex).

  • Check out "3D castle maze" template added in the latest beta.

  • Well, you can clear browser cache and storage. I meant you can't delete save slot from events.

  • No, it's not possible.

  • Try this:

    v1>50
    OR 
    v2>100 Deactivate group
    
    Else
    v1<50 Activate group
    
  • It works without "array" key, then the path will be just "0.3"

    But make sure there are commas between sub-arrays in JSON:

    [

    ["111","112","113","114"] , <- comma

    ["121","122","123","124"] , <- comma

    ["131","132","133","134"]]

  • I would not recommend using dot in the key name.

    Also, it's easier to put JSON string into a variable, then you won't have to deal with escaping all quotation marks:

    String variable j={"key": "foo"}
    
    On start of layout 
     JSON Parse j
    

    Yes, I'm doing this as part of iterating through a foreach-loop.

    You need to post your project file or at least a screenshot of the full event sheet. When you show just one or two events, it's not possible to guess what might be wrong in the rest of your code.

  • If your JSON format is this:

    {"array": [["111","112","113","114"], ["121","122","123","124"], ["131","132","133","134"]]}

    you can access each value that you need using these expressions:

    JSON.get("array.0.3") - will return 114

    JSON.get("array.1.3") - will return 124

    JSON.get("array.2.3") - will return 134