For getting the build time, its relatively simple. There is a timer that substitutes as the in game timer. When a building's construction is started, it records that time down (realtivie to the game clock). When ever the map is saved, it compares the two times, and sets the time left for the building.
For setting build time, a solution I came up with is a rather "duck tape and WD-40" one. You can set the total time it takes to build a building with set value. So for building stuff, you take two arrays, one with all units that are already built, one that is units currently building.
There are ideally two paths with this methodology. You can take the smallest time until completion, and set timers , so that when the map loads everything, they wait until a certain time has passed until the building ends up completing when it supposed to. You can also do this, but just by setting timers to construct a building at a location.
Basically, when map saves, it records the time left to build.
When map loads (via triggers), it takes the time left, and applies it to a timer. A temp building is put in the place of the real building, and if that building isn't destroyed (you can simulate health regen and what not), then its placed down when the timer expires, which is at the same time as the building.
The solution isn't that elegant, and mainly hindered it seems by the lack of support for adjustment.
If anyone else has any more ideas on how to directly influance the progress of a build time for a building, via triggers, for one unit only, then please present it, because thats the ideal solution.
So im building a map which allows you to basically save a state in a melee game, and load it for later use and practice. In doing this, i must tackle the question of how to set/get the construction progress of a building.
I'm currently stuck at even setting the buildings progress.
I am currently saving all units created (doesn't include mineral patches, etc) into a unit array, then when the load is called, it runs through a loop and creates each unit at that units position, with Under Construction and Ignore Placement as options.
As soon as I create it, I then set (last created unit) progress to (slot 1, 100%).
I've tried setting the health of a unit to set its progress, but no dice so far.
How can you set/get the construction progress of a building? Would I have to write a function in galaxy script to do it? (java for several years, so its all good), or is there a way to do it with triggers. (I've searched through everything so far, and nothing adequately solves this.)
Really I tested this myself and cant figure it out. I'm sure somebody knows about this though...
I think I figured a way out of this. There is a condition which checks to see if the building (or unit)'s progress bar is active, empty, or paused. It should be just as simple, to run a check to see if its empty, then run the check again after a given (short) period of time, and if the result is the same, then its idle. I should be able to just run the check on every building, and add up the time to different counters depending on the building.
This is just a work around solution to the problem, not addressing the problem itself. But it works for my application, So i'm pretty happy.
Thanks for your help though zelda. It took me a while to figure out something new, as I would have tried to fix the old broken thing.
I haven't seen you before so let me first welcome you to sc2mapster. :D
Anyways....By chance are you making a nexus wars style map? Do you want the building to just train 1 unit for infinity by ordering it to train every time it finishes training something? It thats the case, then you should use a different event. I believe there is one called " unit is created" or something along those lines. If you aren't doing a map of that style... I honesty dont know what to tell you. If that is the case, send me a PM and I will look into it further for you.
Thanks :D. PM'ed.
The map is basically a melee map trainer, to help players develop higher efficiency of their buildings and what not.
Hey. Tried searching this issue on the forums and google, but after around 30 minuets of tinkering around, I couldn't find anything really relevant.
So I'm making this macro map, and I am trying to detect if a building becomes idle. The whole thing is based upon measuring the idle time of a few buildings.
I go about everything the usual way:
Event > Any Unit becomes Idle
Condition > IsTownHall(Triggering Unit)
Actions > add unit to a stack
It wouldn't trigger at all. So, After a while I did some debugging to see when something becomes idle. Tried making several buildings, and all I could get from "Any Unit becomes Idle", were units. No building would become idle, not even after a very long set period of time. (idle, as in, not making units)
However, the buildings are also classified as "units" in the editor.
Perhaps I'm missing something here? Any help or workaround would be awesome. One work around I could think of, is see if the unit has stopped production. It would be much easier however, if I could just detect or fire an event when ever a building on the map becomes idle.
0
For getting the build time, its relatively simple. There is a timer that substitutes as the in game timer. When a building's construction is started, it records that time down (realtivie to the game clock). When ever the map is saved, it compares the two times, and sets the time left for the building.
For setting build time, a solution I came up with is a rather "duck tape and WD-40" one. You can set the total time it takes to build a building with set value. So for building stuff, you take two arrays, one with all units that are already built, one that is units currently building.
There are ideally two paths with this methodology. You can take the smallest time until completion, and set timers , so that when the map loads everything, they wait until a certain time has passed until the building ends up completing when it supposed to. You can also do this, but just by setting timers to construct a building at a location.
Basically, when map saves, it records the time left to build.
When map loads (via triggers), it takes the time left, and applies it to a timer. A temp building is put in the place of the real building, and if that building isn't destroyed (you can simulate health regen and what not), then its placed down when the timer expires, which is at the same time as the building.
The solution isn't that elegant, and mainly hindered it seems by the lack of support for adjustment.
If anyone else has any more ideas on how to directly influance the progress of a build time for a building, via triggers, for one unit only, then please present it, because thats the ideal solution.
0
So im building a map which allows you to basically save a state in a melee game, and load it for later use and practice. In doing this, i must tackle the question of how to set/get the construction progress of a building.
I'm currently stuck at even setting the buildings progress.
I am currently saving all units created (doesn't include mineral patches, etc) into a unit array, then when the load is called, it runs through a loop and creates each unit at that units position, with Under Construction and Ignore Placement as options.
As soon as I create it, I then set (last created unit) progress to (slot 1, 100%).
I've tried setting the health of a unit to set its progress, but no dice so far.
How can you set/get the construction progress of a building? Would I have to write a function in galaxy script to do it? (java for several years, so its all good), or is there a way to do it with triggers. (I've searched through everything so far, and nothing adequately solves this.)
0
I think I figured a way out of this. There is a condition which checks to see if the building (or unit)'s progress bar is active, empty, or paused. It should be just as simple, to run a check to see if its empty, then run the check again after a given (short) period of time, and if the result is the same, then its idle. I should be able to just run the check on every building, and add up the time to different counters depending on the building.
This is just a work around solution to the problem, not addressing the problem itself. But it works for my application, So i'm pretty happy.
Thanks for your help though zelda. It took me a while to figure out something new, as I would have tried to fix the old broken thing.
0
Thanks :D. PM'ed.
The map is basically a melee map trainer, to help players develop higher efficiency of their buildings and what not.
0
Hey. Tried searching this issue on the forums and google, but after around 30 minuets of tinkering around, I couldn't find anything really relevant.
So I'm making this macro map, and I am trying to detect if a building becomes idle. The whole thing is based upon measuring the idle time of a few buildings.
I go about everything the usual way:
Event > Any Unit becomes Idle
Condition > IsTownHall(Triggering Unit)
Actions > add unit to a stack
It wouldn't trigger at all. So, After a while I did some debugging to see when something becomes idle. Tried making several buildings, and all I could get from "Any Unit becomes Idle", were units. No building would become idle, not even after a very long set period of time. (idle, as in, not making units)
However, the buildings are also classified as "units" in the editor.
Perhaps I'm missing something here? Any help or workaround would be awesome. One work around I could think of, is see if the unit has stopped production. It would be much easier however, if I could just detect or fire an event when ever a building on the map becomes idle.
0
@Fullachain: Go
tried some stuff. just really hard to do anything with the blood because of the data that was provided (the picture)
0
png
jpg
png
jpg
png
jpg
the blood splat ones were really hard to get looking right, but i tried with a bit of overlay, and i think they turned out pretty cool.
0
your the boss boss
0
jpg
png
here are some z legs
looks best on black background