ForEach + Fastloop Gravity Help

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • So, I have one object to govern items, but I'm having trouble getting their individual gravity. I got this working once before back in the MMF2 days using the ForEach object, but it's not working the same as the one built into CTF2.5 The gravity functions for the most part, but tends to jitter when multiple item objects are spawned.

    Any help would be greatly appreciated.

    Edited 2 times, last by MasochisticGamer: Forgot Something (August 11, 2018 at 2:25 PM).

  • Alright, so. Did some tinkering and found a tutorial by AlmightyZenTaco that helped IMMENSELY. Here's the fixed code.

  • I've uploaded an example file for anyone that would like to use these functions for their game. The example shows how to setup stage items with a spread value at the state of a frame (Can be left as is or governed by a Global String/INI/Array to determine which one has been picked up) and Dropped Item functions which will fade away after a set time. All of the item sprites are a single shared object using IDs to determine which item is being displayed. All items are affected by gravity as well, using an embedded collision detector (Since the example is based off Mega Man items, this allows for the one pixel into the ground effect those games share). Optimization of the events is more than possible with this, as I just used simple events to get it working.

    Please login to see this attachment.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!