HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Making a "bunker" need help

02-26-2006, 06:57 PM#1
GordonBBB
Okay, so I have a tower that I can garrison men into. What i want to do is have it so that when a man goes in, he slowly regenerates health. (How?) I also want an invisible copy of the unit that went in (who doesnt move away from the outside of the tower) to shoot so it looks like the guy in the tower is shooting. (How?) When the unit in the tower is ejected, I want the copy to dissapear.(How?)
02-26-2006, 07:39 PM#2
Eeporgorg
Do you want to regenerate health by percent of by numerical values?
Do you want unique damage/projectile art for each unit that goes in or do you want it all the same?

EDIT: Nevermind, Anitarf pretty much killed any chance I had at explaining it.
02-26-2006, 07:39 PM#3
Anitarf
For the invisible unit, just create a unit of the same type as the guy who went in, give it the ability "locust" which makes it unselectable and untargetable, set it's vertex colouring so it becomes transparent, disable pathing for it, move it to the center of the tower and order it to hold position. To be able to remove it later, you should store it to a variable, my suggestion is to have two variable arrays, one unit array to store towers and one unit group array to store the fireing units for each tower. When a unit leaves a tower, loop through the tower array until you find under which index the tower that was exited is stored, and when you do, look at the corresponding unit group and find in it a unit that is of the same type as the exiting unit, and remove it. For health regeneration, you can just modify a regeneration item ability (used by ring of regeneration) and give it to every unit that enters a bunker and take it away whenever a unit leaves a bunker.
02-26-2006, 08:16 PM#4
GordonBBB
Well, I'm a newb at mapping so what you said was like bushman language to me... but as far as health regen goes, i had the units gain life regen aura when they went in, but they wouldnt heal unless they were outside the tower.
02-26-2006, 09:43 PM#5
Anitarf
Well, maybe the aura just didn't work while in transport, but a ring of regeneration-type ability still could. It seems odd that regeneration would be completely disabled in transports, so it could be that it was just the aura that didn't work.

Regarding the other stuff, look around in the trigger editor a bit and you should be able to find actions that do what I described. You can also read some begginer tutorials on this site to get a better feeling for how triggers work. As for the variables, define them in the variable editor; variables are places in memory where you can store information and retrieve it later: the information stored can be a number, or a link to a unit... depends on the type of the variable. Variable arrays are similar, except that they can store more pieces of information, each under it's own index, which is an integer number.
02-26-2006, 09:49 PM#6
GordonBBB
Thanks
02-27-2006, 05:42 AM#7
Jacek
Setting vertex coloring to 0% opacity will probably make shooting projectile effects invisible.
02-27-2006, 09:21 AM#8
Fulla
If you set the scaling value of the dummy units to 0.01 they will be invisible, but you will still see their projectile art.

If you want to be able to manually target enemy unit from inside the bunker you can, not give the dummy units locust.
When you drag a box over the bunker you will select the hidden dummy units and from there you can target units.

Only problem is I wasnt sure how to detect if an individual unit pops out of the Bunker. I was able to detect the *standdown* command but if you have say 4 troops in a bunker and click on 1 to exit him how could you detect that?
02-27-2006, 12:00 PM#9
Jacek
I meant particle not projectile. Missile will always be visible (set scaling of missiles to False)