Setting up Character Abilities
Id like to start setting up abilities that my character can can do when keyboard inputs are made, like if i pressed "1" spell X would be cast and do damage to the target im clicking on. Ya know the basics. Does anyone have a good Tutorial on the subject or perhaps you wanna walk me through it right here im not looking for anything fancy just yet just a place to start. I have the inputs set up in project settings just dont know how do the rest like set how much damage it does, how to set up what target it will hit, how to set it up so it does a specific effect or what not.
asked Oct 25 '15 at 04:49 AM in Blueprint Scripting
Step 1: If you press 1, spawn actor, (the actor being your spell, this needs to be setup as a separate projectil,e probably with the Projectile component added). at the most basic level you can now fire a spell, but you need to get actor location, rotation etc from the player pawn. https://wiki.unrealengine.com/Unreal_Engine_4_Blueprint_QuickShot_-_3_-_Custom_Projectile
once you have that happening move onto the next step. https://answers.unrealengine.com/questions/22394/getting-projectiles-to-inflict-damage.html
answered Oct 25 '15 at 08:34 AM
I like to use a Blueprint component for each ability that get attached to the character if she has the ability. Unfortunately, you can't react to input in components, so you'll need to catch the input either in the character or the controller and then grab the reference to the component you want (either a fixed reference if it always exists or using GetComponentsByClass) and call the ExecuteAbility (or whatever) function on the component.
For actually spawning a projectile, see MrGrr's post.
Follow this question
Once you sign in you will be able to subscribe for any updates here