| 12-18-2003, 02:15 AM | #1 |
um well i know how to trigger pretty damn well if i do say so myself, but i am sick of useing my gay workaround to detect the person that made the structure. putting a location over the building and picking a guy who COULD have made it, just isn't cutting it for what im doing. so what is the referance for the builder!?!? its not triggering unit, although thats what it should be in my opinion, nor is is constructing structure.. |
| 12-18-2003, 02:26 AM | #2 |
Use Player is equal to Owner of Unit of Constructed Structure That should work. If it doesn't just post again, but I'm almost positive. Good luck on your map btw. :ggani: |
| 12-18-2003, 03:24 AM | #3 |
no...... i need the UNIT that does the building. not the player, i use that already :P |
| 12-18-2003, 03:31 AM | #4 |
What are you using this for? |
| 12-18-2003, 03:43 AM | #5 |
That could be a bit more difficult. If I had the editor infront of me, I might be able to work it out, but right now I can't see the event responses... hold on, let me check that list of every events, condition and function.... Well that's odd... I'm pretty sure it can be done, without the workaround.... I agree with Dragon, tell us what you need it for, and maybe we can develop a better workaround. |
| 12-18-2003, 07:21 AM | #6 |
Nope...there's no "unit doing the constructing" response. You can either pick a random unit that could have been building near the thing being built, or you can probably catch the build order and store the unit who was ordered to build (the easiest example would be to intercept the build order and set the custom value of the building to something, then store the builder in array[custom value of building]) |
| 12-18-2003, 12:43 PM | #7 |
oh god. and what im doing should be so simple to. basically i use "workers" in a building. the unit that builds a few types of buildings, should automatically go into the building when it finishes building it, and become the first worker. if u could make something that interspts build order, plz do hydra, cause my workaround works only if there is 1 potential builder neerby, otherwise it just picks a random 1, and thats bad, cause at choke points or something, it could be a builder going 2 build something else important, and the player would never know its not going 2 get build cause the wrong building ate it... oh god, another thorn in my side, same type of problem. u can have a unit begins training event, but there is NO REFRENCE to the type of unit being built :( this is possible 2 aviod by waiting till the end of construction, at which point it is the traind unit, but then ill have to kill it after its made, instead of stop it from ever being made, if some conditions apply :(, it will be kinda cheesy so if anyone can figure out how to that, that would help a lot 2. |
| 12-18-2003, 01:54 PM | #8 |
Well, in 1.13, you can get the current order of a unit, so what you could do is pick a random builder in range with no orders (or order 'stop' or whatever the order is when a unit stops doing whatever it was doing). If builders are the same and don't have mana etc, it shouldn't really matter which idle builder is put into the building as long as one is. The only 'problem' with it is that if you queue two buildings with one worker, the first building will still try to find a builder to go in it, but the original builder will have other orders so it will pick a different idle worker if there is one around. To fix that, you could intercept the build order and set the workers custom value and the building's custom value to the same thing. Then, when the building is done, pick a worker with the same custom value and no orders. That way, if you queue up buildings, the peon will only get inside the last one you build, and it won't put the wrong peon in the building. |
| 12-18-2003, 05:58 PM | #9 |
eh? i dont know how to do that stuff, nor do i feel like learning how to, so if anyone could write me a sample program with the triggers, id appresiate it mucho |
