HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Units firing to the sides

09-23-2003, 07:38 PM#1
Blo0d-Angel
Is it possible so that a unit lines it's side up with the enemy it is firing at? I wonder because I want to make a ship unit that turns broadside to fire. Thanks.
09-23-2003, 08:14 PM#2
35263526
You could make the ship's line of site 10, then make visibility modifiers that only point to the side it's firing it. Then, it would only see units to fire at if they were facing its port or starboard side.
09-23-2003, 09:01 PM#3
Ligature
That won't work, because once it sees a target, the unit will turn to fire at it. I don't know whether or not this would cause that unit to lose the target again or not...

I think you could create a trigger that catches atack orders given to this kind of unit and rig it so every time they attack, or are ordered to attack and are within range, they

1. are ordered to stop
2. set unit facing so they aim their side at the target
3. create an invisible, collision size zero unit at the unit's position
4. order the created unit to attack the target.

However, this is a COMPLICATED fix to accomplish something which I'm guessing is just an aesthetic tweak... Maybe someone else has a better way?

Oh there's always model editing: just change the model's attack animation so it turns sideways! Need to get in touch with someone with 3dSMax tho.
09-23-2003, 11:33 PM#4
Otiluke
If you do it that way it will only attack on the one side, the other side will not fire. Furthermore the direction determined as forward is the direction that it will both move and shoot in. You need to make a new model for a cannon ball, then you need to determine how often it atacks from various points on your ship and play some animation of fire and smoke. The ship itself must have no attack or else when told to attack-move it will face its enemies head on. Or the easiest solution would be to simply swap the ship with a double that can't move when it's firing and shoots sideways. It depends on how much work you are willing to do to make this work. Solution 1 will allow it to move and shoot simultaneously and fire several shots at once. Solution 2 will be ok but it will probably only fire one at a time, and it may warp and shift when it is replaced.
09-24-2003, 11:46 AM#5
Blo0d-Angel
Hmmm. With triggers could I make it so that when the ship has its side to an enemy it spawns an invis unit that has a certain firing arc that shoots once then is destroyed? If I can't make the spawned unit have a firing arc then the ship will fire while moving but it wont only fire to the side.
09-24-2003, 12:01 PM#6
Ant
Triggers. Wheee!!
As they said, either create a cannonball unit, or a unit the cannonball.
Alternatively, you can use special effects to simulate a "cannon ball" moving. I think triggers are the best option.
I'm not sure if this works but you could make it face angle, fire, then face back. If the backswing animation is 0, then it should do it almost instantaneously. It probably won't but...

Which brings to mind how FPS mod people can make the units SIDESTEP and FIRE WHILE MOVING. Hehe If any FPS Mod people are willing to reveal please post :D Many people are dying (hehe) to know.