| 11-02-2002, 09:16 AM | #1 |
how can i make a unit stand on a tower? i saw it in a map once and i really would like to know how :bgrun: (btw how do you "attach" strings to another? i may have misunderstood) help! :bgrun: |
| 11-02-2002, 11:33 AM | #2 |
Guest | To make a unit stand on another unit there are a few tricks, either model editting, which you don't want to attempt, or just create a flying unit at the point of the unit being constructed with 0 movement and just the right hight so he looks like he's standing. |
| 11-02-2002, 03:45 PM | #3 |
or you can (through triggeres) attach a unit to the top of a tower though im not sure this would work... |
| 11-02-2002, 05:24 PM | #4 |
First, model editing isn't really that hard. Second, when attaching the unit, I think you can edit the movement height of the model to adjust it's height, to make the feet look as though they are actually standing, rahter than floating on top of the tower. |
| 11-02-2002, 06:49 PM | #5 |
Well, it use to be simpler, but it ain't no more. If you give a unit movement speed of 0, you're going to run into an immediate problem: you can't increase it's flying height (engine just won't do it) There are 2 possible solutions. In either case the unit that's going to mount the tower _must_ be a flying unit (hover units won't really work, I haven't yet been able to change their flying height in game). Then just use the move action to put the unit on the center of the tower (the unit will need to be about 250 high for a standard cannon/guard/scout tower). Now here's where the two paths diverge. First, you can detect any orders given to the unit, and tell it to hold position. This way the player can't really move it (although in laggy games players actually can because they'll just right click over and over really fast). The second, and IMHO better option, is to give the unit to an allied computer and tell it to hold position. This way the unit still fires, still gets hurt by enemies, but won't move around. The only problem with the second option is that it breaks bounty/kill credit. If you want the player to still get gold for the mounted unit killing enemies, what you'll need to do is the Set Movement Speed action, and set the speed to the player's number (use the Player Property - Player Number function). Then setup a trigger to detect the allied computer killing a unit, and giving gold to the player of the number stored in that unit's movement speed (use the Convert Player to Player Index function). It's a long workaround, but it's how I'm doing it in my TD, and it works pretty damn well. It also lets you specify different amounts of gold for different enemies without having to dive into the unit editor and change a crapload of properties. BTW, if you're worried that by changing the unit's movement speed the player will notice -- remember that the unit isn't going to be moving anyway, so its movement speed shouldn't matter. Also, using special effects won't work because special effects don't fire at enemies. |
