Firezown
(Firezown)
September 28, 2014, 12:48am
16
And you want it to auto-fire at max charge, right? Okay, so this is what you need to do:
See if you can figure out WHY this works and why each part is necessary, it will actually teach you a lot about BPs because this system you’re creating requires a lot of tricks to do!
If it helps, you might rename “auto-fire” to something like “break release”… that’s what it actually does. It creates a flag and when it’s set, releasing doesn’t shoot the fireball. The two circumstances here where it’s used are to break release on an auto-fire (so releasing doesn’t fire if the fireball already fired itself) and to break release if you cancel charging with the cancel charge button. But there are other situations where you might want to use it; for example, maybe if the player is hit, or maybe if he falls into water, or gets hit by an ice spell, or whatever, you want to nullify his fire spell. You might use “break release” as a part of that subsystem to prevent him from firing off a fire spell he was charging when that change took place (you might also create a custom event which goes to the same execution path as the “cancel” command, and simply call it whenever you wanted to cancel his fireballs. That might be easier).
Note that if you’re going to do something where charging the attack causes it to consume more magic points, you’ll need to do some other stuff. For example, you’ll have to connect the max charge value to a “min” node which has the max charge value as one input, and (the MP var) / (MP used per charge state)] for the other, so you can’t charge it beyond what your current MP would allow. You’ll also need to call up the logic which decrements the player’s remaining MP based on the charge state BEFORE you clear it back to zero after firing, or you’ll run into a bug where the spell doesn’t consume MP because you’ve zeroed out the charge immediately after spawning the fireball.
Ok Thanks. I messed with what you posted a bit and got it to work how i wanted. Now i was working on changing the where and how it spawns and i was wondering if you could help. i have it setup so it will spawn infront of me and go to the location im looking. But for some reason it snaps to the ground and moves along it.(i.e if i look up and shoot the fireball it spawns infront of me but on the ground and moves from there). Can you tell me what i did wrong?. Sorry if im being a bother.