| 05-10-2008, 05:53 AM | #1 |
Is there a way to change the build time of units/building in game. (example: it take say 30 seconds to build a tower. If I get the "motivated workers" upgrade i want to make the build time lower (probably by 10% each upgrade)) |
| 05-10-2008, 03:30 PM | #2 |
Urk... there's not an easy way, no. How many upgrades were you planning to make available? How many buildings are affected? The safest way is probably to make different versions of each building and use Chaos or something similar to upgrade your peasants. |
| 05-10-2008, 05:04 PM | #3 |
In that case, the safest way is also the more resources way. Some quick solutions I can think of: -If it's a human-based race, make a dummy unit that powerbuilds. -Related to the previous point, play around with the powerbuild rate in the Repair (Human) ability, maybe make multiple levels of it -Use Unit - Set (<unit>) construction progress to <percentage>% in a looping trigger, and if you can't find a way to get the current progress, use current HP. |
| 05-10-2008, 08:02 PM | #4 |
ruler, yes, we can crush on building being damaged, so have to handle that. But it's not that bad, as I remember, there's a func. to get constr. progress |
| 05-11-2008, 02:57 PM | #5 |
i tried using the Set (<unit>) construction progress to <percentage>% but even more problems came up with picking the right building b/c when i began building another of the same type both building would then change their % to the same %. The unit dummy idea sounds pretty good ill give it a try. Making a unit for every lv of the unit seems like a pain b/c if i have where a particular unit-type event i would have to make sure it's for every unit that also equals say a "farm". But i think if u use an array of unit types for each building (like the "farm") i think i might be able to pull something together. Thank you all for your input |
| 05-11-2008, 05:43 PM | #6 |
Well here's a solution: have different units for the build phase only (units with different build times I mean). Then, when the building finishes building, chaos morph it into some standard building. So you might have the workers building a unit called "Farm (Fast)", and then a trigger like this: And then it will be a normal farm. |
| 05-11-2008, 06:03 PM | #7 |
Well this is what i came up with using the "dummy" (Note: Current_farm is a variable connected to a trigger that changes per "motivated workers" upgrade) Trigger: Then Trigger: With a few changes i should be able to avoid creating 2 triggers for every unit If there is any more ideas please post |
| 05-12-2008, 02:36 AM | #8 |
ok nvm that doesn't work it replaces the unit with an already completed unit. |
| 05-12-2008, 03:11 AM | #9 | |
Quote:
The thing is the point is to keep the same building unit i guess, i could make "upgraded" types of the units but i think i may have figured it out take a look. Trigger: then do Trigger: ![]() Trigger: Building Farm
then i would have a unit be able to build ALL the farm (%) types but not the Farm (real) but the farm (real) will replace the Farm (%) after they are completed. Also have a trigger that switches what building can/can't be build every time a "motivated workers" upgrade it completed. So far my tests have worked but i havent created the "upgrade" itself so we'll see. |
