top of page
  • Writer's pictureCharlie Kowalski

Skill Tree Project

Updated: Mar 11, 2022

I recently decided to continue my adventures in unreal engine by working on a project with my partner Gavin Lechner, where we decided to work on a bow and arrow system that utilizes skill trees to change the players experience.

Some goals for the project are

  • Continue my work on programming animations and working with blend spaces and animation blueprints.

  • Utilize a character and animations from mixamo.

  • Have a bow that fires arrows that sticks in objects and causes damage.

  • Have the game change and adjust based on skills the player chooses.

Week 1:

The first place I begin is by finding myself a character off of Mixamo. Mixamo has many characters online that are easy to import into unreal engine and along with them lots of animations that can be binded to the the selected character.

This is the exact Mixamo animation pack I used, it could be applied to any character on the right (I used it of course on my character)

Once I had my animations and characters in the game I had to redo the basics of movement animations going back to my previous experience with unreal animations blueprints from my previous project which you can read about here!

This is the movement state machine for character, each state has ether a animation or blend space while the arrows allow the changing of current states depending on game data (has the animation ended?, is the player moving the proper speed to trigger the run animation?)

The resulting movement animation came to this!

Week 2:

This was a slow week, I got bogged down other capstones work but I did make some progress in adding in the combat animations

This is the complete animation state machine with the states for bow animations

after adding the animations I know had to import a bow and arrow, I found a simple bow/arrow from some unreal asset boards

Week 3:

With me lacking on the previous I had to step up my game this coming week, by starting with firing a arrow

I started by creating my arrow blueprint and within the blueprints we had to give the arrow states, these states will help us assign whether the arrow is in the bow, in the air, or in a target. With these states defined we can give state specific changes

I want to prevent addition collisions when the arrow is not actively flying so we set it to NoCollision inorder to prevent addition unneeded collision with the bow and the hit targets

When in the air we want to add a projectile component, this will take care of applying the force and shooting the arrow, we pass in the arrows charge amount that way the arrow will fire depending on how charged the bow is.

Onto the topic of the bow I created a custom blend space for the bow using a charged and uncharged image

I used a timeline to generate a charge amount and use this charge amount to pass into the blend space to determining how much to pull the bow back.

Using this shape in the timeline, the bow draws back slower at the beginning and becoming fast towards the end, mimicking the physics of a real bow.

With the bow and arrowing firing now came the ability's, It was easy to determine when a ability has been game as my partner Gavin added a easy to access function to each of the ability buttons.

A snapshot of our games Ui

Once I had discovered if a ability had been selected I could apply the proper changes, the four ability's where

  • Draw speed

Draw speed was achieved by changing the length of the timeline that controlled how the bow draws.

  • Number of arrows

I did this in a not great but workable way where I created three child's of the original arrow blueprint for each needed amount and added the addition arrows, then changing the class of arrow spawned in the reload function

  • Size of Arrows

Staying in the reload function, size was done by changing the size X and Y scale of the assets when they are being respawned in the bow.

  • Damage

This had to be changed deeper within the arrow resulting in calling it when the bow gains access to the arrow before it is about to fire. The best way to test arrows is of course some enemy's so I imported some frim my previous project because they were already set up with hit and death animations.

And that's in! Sorry for the rush of a post I fly out to California tomorrow but wanted to share my work before hoping on the plane!

Week 2:

This week

was my step into the world of animations and system building and a majority was spend on research as I am usually the tech-first, make pretty later programmer. I first targeted giving my players and companions weapons by downloading a free weapon pack from the unreal store and adding sockets to the skeletons of both characters.

After that I built the damage variables for the weapons and formed trigger boxes around the damaging parts of the weapons. To make sure the weapons didn't damage multiple times during the attack animation, the trigger boxes are only activated during certain portions of the animations.

Then it all came to a ahead with the blending of the animations I made sure to cache the default skeleton of the character. Then from there I applied the animations to the upper body of the skeleton and blended that modified upper half with the original walking/running/falling animation of the legs.

Week 3:

For this final week, I combined my research from the previous week and worked on animating the companions attack and the logic for finding a enemy and attacking them. This is accomplished by labeling my enemy's with a enemy tag and having the Ai choose a random enemy to then attack. I used the same process of animation I used on the main character to give the companion its own dagger animations and the enemy reactions for being hit and killed.

4. Move Towards Enemy and Attack

The logic for this behavior is achieved using a parallel selector, it runs two tasks in parallel and ends only when both nodes of the tree are ran. Since we needed to make sure not to fire the second task until the enemy's was in range, we used a blackboard decorator to only fire when the enemy was found to be close enough to strike.

And that's it! We are done! This we super exciting to work on and scoped perfectly for a 2-3 week project. I'm excited to work on a project like this again and check out the video below to see a small demo of the project in its entirety!

13 views0 comments

Recent Posts

See All

Define your final game: game description, intended player experience, platform, technology, market, team members. What changed from the mid-mortem? Set the context for the rest of your reflection. Ach

Hello and welcome to my third development blog! It has been a while since I've posted one due to being swamped with capstone work and work for other majors but I am here to talk about my experiences!

bottom of page