I NEED HELP WITH UNIT VARIABLES AND SELECTING A BUILDING!!!!
If I (using a action) set the value of a unit variable to a building, how do I select that building in another trigger, for example if a use a specific unit event and try and use that unit variable alla that comes up are pre-placed units. I tried usuing 'a unit finishes training a unit' event but that only lets me slect the trained unit how do I manipulate the building if it is not preplaced and how do I manipulate only units that that building produces?
153 posts Over there in the corner!! see me! awe i left... joined
#2
dude that makes like no sense make it simpler... the way i see it u need it so when u add a unit (building) to a variable how do u select if (if it was created/spawned and not pre-placed)
event- Unit finishes construction
conditions...
action- Add (constrcted structure) to [unit group variable] or if u want just a unit variable... Set [unit variable] = (constructed structure)
when using another trigger to use that unit when u choose to pick a unit... instead of going to (select unit) select the variable in the white box...
if that wasnt what u wanted be more specific... we arent the one in the situation so its pretty confusing saying things when you dont say them in order -.=
thats not exactly what I was meaning I mean, that if I cast an ability on a building how do I select the units it trains only and only when it trains them and not when the ability is cast. I guess I was a bit unclear, but I think I found the solution, i'll check it out
153 posts Over there in the corner!! see me! awe i left... joined
#4
Re: thanks
taurenwarriorthats not exactly what I was meaning I mean, that if I cast an ability on a building how do I select the units it trains only and only when it trains them and not when the ability is cast. I guess I was a bit unclear, but I think I found the solution, i'll check it out
its still unclear... u mean like casting unit upgrade ability on a barracks to have it make super footmen or something?...
anyway just make it
Event- Unit finishes casting an ability
Conditions- Casting unit equal to (the caster) _Targeted unit equal to building_ (not sure what condition that would be)
Actions- Add (_targeted unit_) to (effected building [unit group] variable)
that will make it so u can use other triggers using the units effected by the ability casted on the building... or something,
example:
Event: Unit finished training
Conditions: _training unit (??? again)_ equal to (unit in (effected building...group))
Actions: Do whatever u want to the units here
this is all off my head so u gotta look for the _blanks_
Hm, dunno atm, but I think this time you need to put it "triggering unit" b/c there doesn't exist a specific comparison for this (like "training unit" or else).