Nitari's Forum Posts

  • 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

  • I'm trying to make my player get hit by a monster at a specified range from it when the monster is using a special attack.

    However, the overlap at offset function makes me get hit too many times as the "overlap" is continuous.

    Is there a way to workaround an effect for "Collision at Offset" where the contact is only one-time off?

  • Have you tried restarting your computer?

    Yep! This prob happened after I turned off my computer and then used it the next day. So I tried turning it off again and using only construct after its turned on. Still low fps

  • I'm not sure if this happened to anyone else but this was what happened to me:

    The night before I was testing my game with neat 60 fps, but the next day it drops to like 10 fps. I'm not sure what happened and I'm also sure I haven't changed anything :/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • THat worked! Thanks man

  • I wanna create an expression doing this:

    3 / [number of an instance present]

    I would like to know what to type in!

    Details: Instance name - mob0