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"

Changing behavior of ingame character

I am currently building a strategy game in which a single person shall be able to change its job during the game. The difficulity with this is that I will have about 20 jobs, which will of course all need to interact with the world in different ways. I am currently wondering what could be the best way to manage all of these jobs or the switch between them. I had several approaches in mind which all don't seem good to me:

  1. Create multiple classes for all jobs, create a switch animation a la Sims and delete the old person object after the new was spawned at the same location (transferring basic information about the person into the new object)

  2. Create a massive behavior tree with most of the variables needed for job executions and use decorators to select different tasks based on the job enum

  3. Create separate behavior trees for humans with variables needed for a specific job. Change the assigned behavior tree after job was changed

In my opinion, all approaches are a bad solution for the problem and I feel like I am missing something since I still don't know all facets of UE4. Have some of you already dealt with a situation like this and found a best practice approach?

Product Version: UE 4.21
Tags:
more ▼

asked Jan 27 '19 at 04:57 PM in Using UE4

avatar image

mistercokes
1 1 3

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

0 answers: sort voted first
Be the first one to answer this question
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