calminthenight's Forum Posts

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "%" 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.

  • 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

  • It is like that in the animations. The image size of some of your animations is way bigger than others, which makes the collision polygon bigger, even when drawn around the characters body.

    Because you are using physics it also increases the mass drastically.

  • I'm looking into ways to efficiently access an images pixel coordinates and RGBA values. My js knowledge is way out of date and I have never used used C3's js scripting.

    Before I go too deep into trying this, I was hoping someone could give an indication of whether it would work in C3 or not?

    MarvinJ is a pure javascript image processing framework:

    Script here: marvinj.org/releases/marvinj-0.7.js

    The code I think would be useful to do an Alpha comparison per pixel is demonstrated here:

    image = new MarvinImage();
    image.load("yourimage.png", imageLoaded);
    
    function imageLoaded(){
     console.log("(0,0): "+(image.getAlphaComponent(0,0) > 0 ? "NOT_TRANSPARENT" : "TRANSPARENT"));
     console.log("(150,150): "+(image.getAlphaComponent(150,150) > 0 ? "NOT_TRANSPARENT" : "TRANSPARENT"));
    }
    

    Any hints/tips are greatly appreciated