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"

Best way to create classes

This is going to be more of a procedure-based question: how would you go about creating different abilities/classes, and then applying them to different players, without having a huge mess on your hands?

Example: 10 classes that have different abilities. How do you organize all of that?

  • One approach could be to have child blueprints for each class that augments the base character blueprint, then apply these on begin play based on assigned actor tags.

  • Another is to downright copy the base blueprint for the characters into 10 copies, modify each to suit the classes, and then organize the possessions based on a previous choice.

I've seen some interesting ideas in older threads, but I'm really curious if there's any other or newer, clever solutions out there.

Product Version: UE 4.18
more ▼

asked Apr 17 '18 at 03:04 PM in Using UE4

avatar image

10 5 5 7

avatar image GarnerP57 Apr 17 '18 at 05:06 PM

You could use a component based approach instead of inheritance or both.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

First option is the best, 2nd wont give you ability to create common code for all them increasing work by 10x. Doing components won't help here because you end up creating 10 actors with different component and it needlessly complicate communication between objects

As for abilitied, i classes (i assuming by "class" you mean class of character that player can have) share them you will need to do ability system, you make base ability class and then base character would have array of abilities. Ue4 got some ready gameplay ability system but i never explored it


Even if classes don't share abilities you may want to make/use such system if you plan to do some more complex ability system

more ▼

answered Apr 18 '18 at 06:53 AM

avatar image

37.3k 936 172 1116

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

if abilities are equipments I would create them as different actors and let them do their own functionalities and I would spawn them and attach them to my character instead of using child actor components.

if abilities are things in my character's DNA :) it would be better for my character to be born with them so his children can inherit those abilities and also have their own abilities.

more ▼

answered Apr 18 '18 at 10:06 AM

avatar image

2.4k 73 43 108

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Sounds like you want to create a hotbar and a bunch of ability functions then, just create logic to fill the hotbar with specific abilities depending on the class. I can help if you need: https://forums.unrealengine.com/community/got-skills-looking-for-talent/looking-for-work/1460529-cheap-flat-rate-need-to-program-your-ability-features-spells-skills-we-got-you-covered

more ▼

answered Apr 19 '18 at 03:49 PM

avatar image

366 3 2 12

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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