Hi all! Right now, I'm working on a classic feel 3D platformer, that has a handful of platforming mechanics and abilities. Naturally, you wouldn't want to use one mechanic at the same time as the other. For instance, if gliding in the air is controlled by holding the left shift while in the air, but ground pound is used when in the air and pressing another key, how could I differentiate the two actions? Now, the simple answer (and what I already programmed) is to just set up some conditions to make them work independently, which was fine until I started to throw in other mechanics. Like, if I'm gliding, I'll have to cut off jump, double jump, and mechanic number 3, but when I ground pound while gliding, I'll have to cut off gliding, but maybe mechanic #3 becomes available, and jump and double jump won't turn back on until I land. It get messy, you see? And right now, I have a web of booleans that has gotten hard even for me to keep track of.
My programming teacher always said, "Code smarter, not harder". It sounds like a stupid question, but is there perhaps a simpler way to organize or implement small abilities without having to get a hundred bool variables and endless if, and, or statements. (Right now, abilities the player can use independently are all under the same character BP)
My programming teacher always said, "Code smarter, not harder". It sounds like a stupid question, but is there perhaps a simpler way to organize or implement small abilities without having to get a hundred bool variables and endless if, and, or statements. (Right now, abilities the player can use independently are all under the same character BP)
Comment