of     1   

Seattlantis
#149688060Thursday, November 13, 2014 1:42 PM GMT

I was thinking, what if falling parts that landed on your player actually did damage to you? That's what I attempted to do, and it only took me ~30 lines of code (the actual collision calculating is done in under 20 lines, I just added a few wait() functions between statements so that something wouldn't happen without its independent cause being activated first) and a few hours thinking out formulas and actually testing them. https://www.youtube.com/watch?v=v--jPxSJYE4 The debris are spawned 64 units directly above the player's head and are a random size between 1 and 25. Once the debris are spawned, the player is held still for their impending doom unless they survive the damage. The damage is calculated based on the debris' size and velocity ─ if the debris is large and slow it'll probably do a decent amount of damage, if it's small and fast it'll probably do a large amount. Once in awhile the collision isn't detected and you go unharmed, but that only happened when I was recording and the fix to that was moving to a new position. In the future I might make this a system that can detect which body part debris hit to get an even more accurate damage value.
Seattlantis
#149705432Thursday, November 13, 2014 10:38 PM GMT

a

    of     1