• 🏆 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!

[Solved] Custom repair ability targeting not owned buildings and adding to construction progress

Status
Not open for further replies.
Level 1
Joined
Oct 13, 2021
Messages
4
I want to implement something like repairing in Castle Fight: workers being able to repair ally's buildings. But, also, I want them to be able to construct other player's buildings together.

And I've got couple problems:
1) Repairing - basic human ability hardcoded to target only buildings owned by player; Remaking from healing looks ok, but "target is already healing", so it doesn't allow few workers at same time; Remaking from parasite still blocks other workers, just in other way, and also resets animation (duration of effect is 0); Channeling abilities that I found hardcoded to target only enemies.
So, what ability should I take as base to make multiple workers from different players work together? And how to modify it properly? (Please, give also ability ID)
There were similar questions on hive, but I didn't find any answer which can help me.

2) Construction progress - can be only set, but not added, and seems that there's no way to read current progress. Is there any way to increase it? I assume that I can store all buildings in <building: int progress> array and then apply it with every cast, but idk how to make array without fixed size - and is it a good idea at all.

Notice: I can't use vJass and barely know basic jass, so GUI is preferred.

UPD: Solved. Seems like using attack detection and second type of attack is easier than messing with abilities. For building progress used custom value of a building.
 
Last edited:
Status
Not open for further replies.
Top