Techtree requirements

Xan_Kriegor

I can change this now in User CP.
Reaction score
12
In a map I'm making there are some unit abilities that require resources (custom ones, not Gold or Lumber. Resources are represented with units). I'm using the Techtree Requirements to make it so that should the player not have what they need, it will tell them what they need and disable the ability. However, I run into an issue when an ability takes up multiple of the same resource. The way techtrees are set up I can only set the ability to require one of each resource. If I add the resource multiple times it still is enabled after the player acquires one (as 'both conditions' are satisfied) of them.

Anyone know of a way to use the techtree system this way without shenanigans?
 

Inflicted

Currently inactive
Reaction score
63
I'm not entirely sure what you mean by "shenanigans", but perhaps using triggers to check the total amount of the amount of the resource alive, then creating a dummy unit. You could use the dummy unit as the techtree requirement.

Manipulation of the dummy must be done effectively or this could be buggy.
 

Xan_Kriegor

I can change this now in User CP.
Reaction score
12
That's what I was thinking I would have to do, I was just hoping someone would know of a better way than that. Ah well. Thanks though!
 

Solu9

You can change this now in User CP.
Reaction score
216
Im not clear on if the map resources MUST be counted in units. But I guess thats not a problem really. You should just add a check when a player wants to buy something, that he actually have that amount of resources (units).
Doing it with tech requirements seems to be a more difficult way to do it and as you have witnessed, can cause problems.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top