GeometriX's Recent Forum Activity

  • You can do it very easily by using a couple of built-in functions. You'll want to determine its current speed and angle the moment it's dropped. Create an object with the drag and drop and physics behaviours.

    Every tick, you'll record the object's X and Y - this becomes the previous X and Y.

    To determine speed, use the formula of speed = distance / time. Distance is that between the old X/Y and current X/Y. Time is delta time. Distance(previousX, previousY, currentX, currentY)/1*dt.

    To determine the angle you use a similar principle, but using the built-in angle function: Angle(previousX, previousY, currentX, currentY).

    Apply the results to a physics impulse at that speed and angle and you've got yourself a solution.

    Example capx [R117]: here.

    Welcome to the forums!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi ASHLEY. I just found this thread because I've been trying to get fonts to work in CocoonJS on Android. I export to CocoonJS and the font (which I've imported under files) simply goes into the root of the zip. It doesn't place the font into a folder.

    If I manually create a font folder in the zip and place the font into that folder, the font works on my game. Otherwise, it doesn't show up at all.

    Is this a bug, or a limitation of C2, the export process, or CocoonJS?

  • I've learnt more from the solved threads than anything else on this site (manual and tutorials included), so I'd strongly disagree that they should be removed. Going into a thread and finding that it's solved usually prompts me to see how it was solved, and add that little nugget of information to my own repertoire.

    Moving them to a sub-forum would mean that they'd be neglected, relegated purely to searches. I enjoy reading through all threads in this section and if they're put off to the side then it'll just make it more of an effort to browse through them.

    A "solved" tag, on the other hand, wouldn't be remiss.

    Actually, giving it some thought I'd really appreciate a tag feature around here, and I think it'd be especially helpful for the newcomers. Tags like beginner, intermediate, advanced, physics, behaviour, UI and so on would be very useful to organise content at a glance, and could make searching a whole lot more powerful, too.

  • It's probably a single pixel lining the edge of the image itself.

  • WebStorage might seem a little weird but it's actually quite simple. You should really just post your capx (create a separate one for testing this function if you're worried about people nabbing your files) without requiring someone nominate themselves as your helper.

    The issue here is that you say you've done the tutorials but still don't understand it? How far have you managed to get; where are you getting stuck? It's difficult to offer the right help if your request is too broad.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Necro-ing this again because, unless I've missed it entirely all this time, it was snuck in during a recent update.

    Under object properties there's now a property called initial frame :)

    Either way, this is brilliant - it might seem like a small thing but it'll make a big difference in this particular project. Thanks!

  • I love to keep things organised, and with my current project closing in on 400 events (at this rate it'll push 1000 when completed), I have to.

    For starters, I've put global variables into their own event sheet. I've also put all reusable game logic into its own sheet called Main Mechanisms. Then, every level/screen/etc has its own sheet, which is a very trim, very neat little thing that I can use to change level parameters quickly.

    I use groups extensively - probably have about 40 at the moment. And sub-groups too. Basically, whenever an event looks like it's going to be larger than the height of my screen, I put it in a group, together with anything that would logically go with it. All my initialisation stuff is in its own place, so are my settings for mobile, my controls, AI, world events, etc.

    Getting organised early and staying that way is good practice.

  • Why don't you use move commands, instead of manually setting the position every tick?

    Set up a custom movement behaviour and use that to move them to your touch locations, then give them an on collision event that tells them to stop when they bump into each other.

    Alternatively, set your entire "on touch do move" event to be conditional that the two sprites are not overlapping.

  • Hmm, yeah there's no inverse action of "on collision", so you could use the closest thing, which is "is overlapping with". This tests if the two are actually overlapping, which isn't possible with a wall which I assume you've set to have a solid behaviour.

    My solution: create a new object, called WallBuffer, which is dynamically spawned and resized to match every wall instance in the map, but is a few pixels wider. Test if the player "is/not overlapping with" this buffer (which is invisible, and isn't set to solid), to change your opacity to 50% and back.

    A quick capx to illustrate my point: here.

    EDIT: Ah, beaten by Nimtrix. That solution is actually more elegant, setting opacity to 100% at every tick, which is obviously then counteracted by the 50% opacity event. Nice.

  • If your sprites are in evenly sized cells in the sprite sheet then you can import the whole thing directly into Construct. With the animation editor open, right click on the animation frames window the bottom of the screen and click "import sprite strip". Choose the number of cells across and down, and it'll slice up your sheet.

    You can use parts of the sprite sheet, but you have to import the full sheet first and then delete the frames you don't want.

    If your sprites aren't in uniform cells, then you'll have to do it manually.

    In Construct speak, a sprite is a single 2D image. Multiple sprites can be arranged in succession to form an animation, and a single object can have multiple animations stored within it. A sprite sheet is a collection of sprites arranged in a single image.

GeometriX's avatar

GeometriX

Member since 23 Aug, 2012

None one is following GeometriX yet!

Connect with GeometriX

Trophy Case

  • 12-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies