HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

GetUnitConstructionProgress?

04-24-2006, 07:39 AM#1
Moss
I want to make an ability that accelerates the building and upgrading of buildings. There is a function for setting the progress of an ability but is there any way to get the current progress? Cuz that is no use if I can't.

I would use invisible powerbuilding peasants, because I also want the ability to repair, but towers are built on my map using abilities based off of Build Tiny Scout Tower and powerbuilding doesn't work for that or for upgrading so....

Any ideas?
04-24-2006, 07:59 AM#2
PipeDream
How about triggering when things start building and keeping internal track of where construction progress should be? Lack of feedback sucks, but it's not as bad as trying to calculate something like unit dps.
It would probably be easiest if all the construction progress was done through triggers.
04-24-2006, 10:47 AM#3
Earth-Fury
Quote:
Originally Posted by Moss
I would use invisible powerbuilding peasants, because I also want the ability to repair, but towers are built on my map using abilities based off of Build Tiny Scout Tower and powerbuilding doesn't work for that or for upgrading so....

Any ideas?

remove the tower as soon as orderd, order an Neutral passive invisible peasnt to build the tower, change the owner as soon as initially made, and add on extra peasnts as needed?

Not that simple, but a bit more simple (imho) then making a system to keep track of the current build progress.
04-24-2006, 10:25 PM#4
TaintedReality
Quote:
Not that simple, but a bit more simple (imho) then making a system to keep track of the current build progress.

Wouldn't be hard to keep track. Just have an event that fires every time construction begins, attach a handle variable, then start a periodic timer that updates the handle variable every 1 second. Then you can easily get the attached variable whenever you need it.