calminthenight's Forum Posts

  • Use three different sprites for the player, the trunk and the foliage. Then you change the z order of the sprites so that the player is in front of the trunk but behind the foliage.

    Then you need to make the stump impassable by the player, depending on how your game is set up you could give both the player and it the solid behaviour.

  • Can you explain a bit more what you're actually trying to do?

    In your example your object name is "bar", so unless your comparison value resolves to be "bar" then it will not be picked.

    If you want to pick objects by name you could use a family. Place all your pickable objects in a family, pick the family object in the pick by comparison event and use family.ObjectTypeName expression. Then you can compare values that will resolve to the names of your objects.

  • There shouldn't be a delay under normal circumstances but instead of using every tick set position, when it is created, set it to the player position once and then add it as a child of the player and select the option to transform to the players X & Y position

  • Btw, can I somehow detect the FPS and reduce the graphics / particles if low cpu?

    You can use the "FPS", "cpuutilisation", and "gpuutilisation" system expressions to detect high loads and then apply actions to reduce those loads (such as removing effects etc.)

    for the cpu and gpu utilisation you could use:

    Evaluate expression: (cpuutilisation*100)>90

    For FPS you could use:

    Evaluate expression: FPS<'targetfpsrate'

  • "%" is the modulo operator to return the remainder after a division.

    You can read more about C3 operators here: construct.net/en/make-games/manuals/construct-3/project-primitives/events/expressions

    If you want to find fifty percent of a number simply divide it by 2. So "1000/2".

  • Kinda hard to say from what you've mentioned, but there are plenty of ways you could keep track of which text instances are associated with a certain sprite.

    Have a look at this example. It passes the cars UID to a instance variable on the text, then that is passed to a function to handle moving and deleting the text instances. The text instances are all added as children to the car that is their parent and they follow it etc.

    1drv.ms/u/s!AkmrWgxeuxlKhId3JV3j_rkStx0kjA

  • You're right that you can't do collision detection on text objects.

    If you just want to add extra text you can use the "append text" action in the text object, and use '& newline'.

    If you want to add a new text instance and position it next to the other, assuming you have the origin point on the top left, you can pick the text object and then create another text object at X=text.BBoxLeft, Y=BBoxbottom+20.

    This will create another text object 20px below the one that is picked.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use the "Is Between Angles" system condition instead. Also, I think your angle is reversed.

    EDIT: Beat me to it

  • Trigger sprites is good. You could also use Raycasting to determine if there is a building infront of the enemy or if they have approached a precipice.

    You could cast a Ray at short intervals at 0°(to detect building in front) and at something like 75° to detect lack of ground in front (you would have to think of something for large downward steps). You would set the raycast distance to an appropriate value.

    If the ray is not intersected you trigger your jump actions.

  • Why not throw in some fireflies too for good measure :)

    1drv.ms/u/s!AkmrWgxeuxlKhId2uKIq0cvi9KDnTA

  • there would be a vehicle 45 degrees to its right and behind it

    45° to it's right would put it in front of it?

    But I think I know what you mean. The formula would possibly be:

    Set position VehicleB to:

    X=VehicleA.X+cos(VehicleA.angle+45)*75

    Y=VehicleA.X+sin(CehicleA.angle+45)*75

    Is this what you are after?

    1drv.ms/u/s!AkmrWgxeuxlKhId1rlIF8_QqOkRHDw

  • That solution seems to work perfectly :) Laurent You can remove the else condition and clone the first event twice, swapping out the snapshotRed for green and blue.

  • I was wondering what I missed here, I couldn't see any link that you posted dop. Turns out I can't see either your post with the link or Laurent's reply until i go to make a reply post and it appears in the thread history below.

    That's a new forum bug for me.

  • Nah just need someone with some C3 JS knowledge to show me how to modify it for C3. Or I'll get there eventually through blind luck.

  • construct.net/en/forum/construct-2/how-do-i-18/simple-scorched-earth-worms-129595/page-2

    Unfortunately that method doesn't work in C3