• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

HIVE

Bannar
Bannar
Sure thing. You don't have to ask for help, write down your questions immediately.
gusanomental
gusanomental
I felt that would have been quite bossy and unpolite.

Well, I need:
-Different regrowing times for different kinds of trees.
-No revival as long as there are units walking on top of them.

Thanks for your help.
Bannar
Bannar
There first one is easy, but the second one is entirely different thing - i.e. should not be a part of that system, but instead a customization.

To implement the first, one can use hashtable for saving respawn timers for each destructable-id separately. Before starting regrow timer, check if such value exists for given destructable-id. If not, fall back to default regrow delay.

Second one is trickier. I.e. you would have to specify a "collision size" of a destructable i.e. area which given tree occupies and needs no units inside to be regrown. Each time a periodic timer elapses and system is about to regrow a tree, check for existence of unit objects within nearby area given the collision size. If at least one is found, this means that timer should be restarted and attempt again in the future.

I can help with coding if you are not sure how to proceed with this one. I might also be updating my TreeRevival this weekend, so our goals align.
gusanomental
gusanomental
Then I'm in my lucky week! I'll wait for your update before deciding what to do next.

Thanks again.
Bannar
Bannar
Delayed due to amount of requests ppl threw at me : )
I'll look into it either today evening or tomorrow. Don't think I've forgotten : )
Bannar
Bannar
How familiar are you with vJass? Asking in case I'd like to provide solution in vJass.
gusanomental
gusanomental
I'm afraid I'm a GUI peasant with no (v)Jass knowledge at all.

Just take your time, my friend. This is far from being an emergency.
Top