XaiJu
Megan Fox
Megan Fox

patreon


November Code (gap logic)

So yeah, like I said in the main update, this is just weird. Trying to generalize it got super nasty, and you can... I mean yeah just see here. https://pastebin.com/d6PzunQL 

The core is the GapGatePassed function. That's an external static function (this logic lives in the singleton MissionManager) which gets called by detectors in the world when the player skates through them. The dumb form of those detectors are just "did you skate through". For cases where you require the player to say, grind up a rail, ollie, kickflip the gap, then land in a grind, then you'd have an evolved kind of gap detector that doesn't fire until you're doing a particular class of trick (grind or flip respectively). Then you'd slam a grind detector down at either end, and a big kickflip detector in the air between, and link them into a 3-gate sequence, and there you go! Fancy gap.

Here's how one of the dumb detectors works, as a for-instance. My fancier ones use an upgraded detection system I wrote for the missions. Maybe next update! Dunno.


More Creators