x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.9
Tags:
more ▼

asked Oct 25 '15 at 04:49 AM in Blueprint Scripting

avatar image

CodyScrib
53 9 16 21

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

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

more ▼

answered Oct 25 '15 at 08:34 AM

avatar image

MrGrr
981 34 3 41

(comments are locked)
10|2000 characters needed characters left

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.

more ▼

answered Oct 26 '15 at 09:54 AM

avatar image

erinacea
1.8k 68 28 112

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question