Nitari's Recent Forum Activity

  • What I'm doing now is placing diagonal and horizontal ground solids together to make fields and hills, but I have problems such as falling through the ground when I walk past an imperfect transition from platform to platform. Is there a better way to do this? Thanks!

  • Nitari

    floor(x) Round down x e.g. floor(5.9) = 5

    round(x) Round x to the nearest whole number e.g. round(5.6) = 6

    ( )

    Ahh thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • jourdan Hi! I was curious what floor means, is it the same as round?

  • The touch triggers invisible events also Phoenixbowman

  • Wait I've got it working through this form of code

    It seems the problem stems from before the game has any Slime instances (In this case a Ribbon Pig), so by placing the condition of having at least 1 Slime I avoided that problem!

  • Hi again!

    What I am trying to do now is to make a type of mob toggle left or right at random time intervals. Problem is, when there are multiple mobs (Slimes), all Slimes would change direction at the same time. I've tried using (Pick Random Instance) to solve the selection issue, and then (4 seconds / Slime.Count) so that the time interval between the toggling in slime direction is the same.

    It worked for a bit, but now the slimes aren't even changing direction. Is there a more efficient way to do this? Thanks in advance!

  • What you're looking for is exactly what R0J0hound mentioned.

    Setting the origin point

    If you double click on the collision sprite object, the image editor should open.

    In the image editor, on the left-hand toolbar, choose the 2nd tool from the bottom (looks like a crosshair). This is the "Set origin and image points" tool.

    With this tool selected you can set the origin point of your object wherever you want. You can also use the number-pad on your keyboard to quickly snap the origin point to the center edges or corners of the sprite image, though Num-Lock must be enabled for this.

    If the default images of your sword and character face rightward, then for your collision sprite, you'll probably want to put the origin point on the far left edge. You can press numpad-4 to do this, if Num-Lock is enabled.

    Accept the changes and then try it out in the editor by holding down Ctrl + Shift and Dragging one of the corner resize handles on your collision object. It should now scale around the new origin point you just set.

    (You'll want to undo that resize afterwards of course. Be careful not to also undo the change to the origin point.)

    Flipping the sprite

    As for flipping or mirroring the object, in that object's actions, in the Appearance group, you can use the "Set Mirrored" action to flip the object horizontally, and the "Set Flipped" action to flip the object vertically.

    C2 Manual Page on Image Points

    Thanks so much! The origin part was a lifesaver, if only i could give you real cookies XD

  • Hey Nitari,

    One possible approach, instead of using "overlapping at offset", you could use a second invisible sprite as a collision object, and stretch it wider as the sword range increases.

    Thanks so much! I have one question though, now what's happening is that when I increase width, the box grows wider in 2 directions. I can't find an efficient way to position the box such that it protrudes out in front of the player rather than the default widening on both sides. Also, the mirroring is another issue

  • Is there a way to include in my expression a range? etc (0,20) for the "Overlap at Offset".

    I'm trying to make a customisable range of the sword swing of a 2D platformer game but the higher the offset, the further I can attack but I lose contact of the mobs closer to me.

  • I think it is indeed possible to make similar games, but the more significant question would then become what about its efficiency?

    I think Construct 2 is designed for lighter games in html5. Though it may be able to make amazing platform games like Ori, a lot of work is required due to its relative "stiffness" compared to Unity and this may cause lag issues

  • I want to cause an animation to occur while pinned a distance away from an object that is moving, but there doesn't seem to be an option for that. How do you guys work around it?

    Also to minimise on thread creation, I would also like to ask here on how do I customise my animations more?

    I seem to encounter an itchy problem where my sprite which has a glowing orb behind him is "floating" on platforms. How do I register his feet to be the foot of the platformer behaviour while the glowing orb has no collisions? (Btw, the orb and the person are one sprite and cannot be separated)

  • Add a "Trigger Once" condition to the overlap at offset check.

    Thanks for the quick reply! I really appreciate it

Nitari's avatar

Nitari

Member since 13 Jul, 2015

None one is following Nitari yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies