Build/upgrade/repair abilities

nRedux

Member
I'm interested in my players being able to construct/upgrade/repair structures in the world. If you're familliar with Rust or Fortnite you've seen these mechanics. I've made some assumptions:

1. I would write a custom ability - or abilities - for these things.
2. I would activate this/these abilities when a specific tool is equipped (in player hands)
3. On fire, I would use the weapon/item to get the hit location, and perform the desired action.

Now these are very broad strokes, but I'd like to know if it sounds appropriate or if abilities are overkill and there's a better solution. Whether my assumptions are correct or not, can I get a pseudo code description of what a more knowledgeable and experienced UCCer would do here?
 
That sounds like the correct approach. You'll definitely want to go the custom ability route and your starting method sounds like it should work.
 
That sounds like the correct approach. You'll definitely want to go the custom ability route and your starting method sounds like it should work.

Can you point me in the direction in the docs where I can read on how to make an ability active as the result of a certain weapon being active?
 
Within CanStartAbility you can ask the inventory for the current weapon and then do a comparison of the ItemType with that:

 
Top