(If you see typos, please point them out so that I can fix them)
If you're like me, one of the first things you did was add a weapon to a building in the hopes that you could have structures start shooting laser beams at everything that moves. What you probably discovered is that the weapon never fired and you were left with a normal building that just spewed errors at you. This tutorial remedies this problem by walking through the process of creating turrets.
Turret Basics
While we will be working with attached turret models, they aren't required and are merely for aesthetics. The core parts of any turret are:
Turret Object: This controls the turrets rotation speeds, range of motion and behavior. Without this you WILL get errors any time you try to attack with your Weapon. The only exception is if the unit can change its own facing through movement. Thus this is crucial to stationary objects like buildings.
Turret Actor: This is responsible for "turning on" the turret. Without this, your turret won't function even if your Turret Object is setup properly. It allows you to control what model rotates (as the turret) and what anchor point to use for the axis. Keep in mind that only certain points can be used. Turret Z being the most obvious choice.
Weapon: Once you have your turret setup, you need to attach it to a Weapon. Then whenever the Weapon would fire, the Turret Object will rotate to face its target and fire away. In the case of buildings, you won't see any rotation (unless you chose to), but the Turret Object will rotate the invisible, non-existent Turret Actor to face the target.
Turret Hub
Effects Tab
Create a new Effect named NE Turret (Damage) with Effect Type: Damage
set AI Notify Flags: Hurt Enemy
set Amount: 10
set Death: Fire
set Flags: Notification
set Kind: Ranged
set Response Flags: [Acquire/Flee]
Duplicate 3 times and change NE to NW, SE and SW
(Because very little changes between objects I'll be having you duplicate frequently.)
Weapons Tab
Create a new Weapon named NE Turret
set Effect:NE Turret (Damage)
set Backswing: 0
set Damage Point: 0.3333
set Period: 1.5
set Damage Display Effect:NE Turret (Damage)
set Icon: btn-building-protoss-photoncannon.dds
set Options: [Can Initiate Attack/Only Fire While Attacking]
set Target Filters: Exclude [Dead/Hidden/Invulnerable/Missile/Self/Stasis] and Require [Visible]
Duplicate 3 times and change NE to NW, SE and SW
set Damage Point: 0.6666, 1.0 and 1.3333
These are the Turret weapons that will go on the building.
Turrets Tab
Create a new Turret named NE Turret
set Idle: Spin
set Yaw Arc: 360
set Yaw Idle Rate: 45
set Yaw Rate: 360
set Yaw Start: 0
Duplicate 3 times and change NE to NW, SE and SW
You can set these to whatever you'd prefer, but Idle controls the turrets action when not in combat, Arc controls its range of motion, Idle Rate is how quickly the turret rotates out of combat, Rate is how quickly the turret rotates in combat and Start determines the angle the turret begins facing.
Models Tab
Create a new Model named Hub Turret
set Model: PhotonCannon.m3
Create a new Model named Turret Beam
set Model: ColossusBeam.m3
Create a new Model named Turret Death
set Model: PhotonCannonDeath.m3
Units Tab
Duplicate the Nexus structure and its corresponding Actor. Everything else will be stock or made from scratch.
Name it Turret Hub
open Abilities + and remove all but [Attack/Stop]
open Command Card + and remove all but [Attack/Stop]
remove everything in Behaviors +
open Weapons + and add NW/NE/SW/SE Turret (Weapon and Turret)
Name the building's Actor Turret Hub
Actors Tab
Site Operation Actors
Create a new Actor named SOpAdjustNE with Actor Type: Site Operation (Local Offset)
set Local Offset: (0.0, 3.0, 0.0)
Create a new Actor named SOpAdjustNW with Actor Type: Site Operation (Local Offset)
set Local Offset: (-3.0, 0.0, 0.0)
Create a new Actor named SOpAdjustSE with Actor Type: Site Operation (Local Offset)
set Local Offset: (3.0, 0.0, 0.0)
Create a new Actor named SOpAdjustSW with Actor Type: Site Operation (Local Offset)
set Local Offset: (0.0, -3.0, 0.0)
Each of these will offset the attached turret models to the specified coordinates.
Model Actors
Create a new Actor named NE Turret with Actor Type: Model and Based On: ModelAddition
set Model:Hub Turret
set Scale: 0.8
set Host +: Subject > Turret Hub
set Host Site Operations +: SOpAttachOrigin and SOpAdjustNE
open Events + and create the following events:
Unit Birth - Turret Hub
Create
Unit Death - Turret Hub
Model Swap (Name: Turret Death)
Actor Creation
Animation Play (Name: Attach; Animation Properties: Stand; Flags: Play Forever)
Model Swapped
Animation Play (Name: Death; Animation Properties: Death)
Animation Done
Animation Name Death (Term)
Destroy
Duplicate 3 times and change NE to NW, SE and SW
These actors will create the turret models and upon dying swap in a Death Model rather than snuffing the model from existence the moment the Host dies.
Create a new Actor named Turret Beam with Actor Type: Beam (Simple) and Based On: Beam Simple Animation Style One Shot
set Model:Turret Beam
open Events + and create the following events:
Actor Creation
Animation Play (Name: Beam; Animation Properties: Stand; Time Variant: 0.5; Time Type: Duration)
Animation Done
Destroy
This actor is part of pair. We're going to create its Attack Actors next.
Site Actors
Create a new Actor named NE Site with Actor Type: Site
set Host +: Subject > NE Turret
set Host Site Operations +: SOpAttachWeapon
open Events + and create the following events:
Unit Birth - Turret Hub
Create
Unit Death - Turret Hub
Destroy
Duplicate 3 times and change NE to NW, SE and SW
These will allow you to shoot the beams from the turrets by creating reference points.
Attack Actors
Create a new Actor named NE Beam Attack with Actor Type: Action and Based On: GenericAttack
set Beam:Turret Beam (Actor)
set Launch Assets +: Sound > Colossus_AttachLaunch
The Launch Assets + controls the sounds/models created at the Launch Site and the Impact Map + controls the sounds/models created at the impact point.
Turret Actors
Create a new Actor named NE Turret Actor with Actor Type: Turret
set Turret Body +:NE Turret (Actor)
set Yaw Query +: Direct > Turret Z
open Events + and create the following events:
Turret Enable - NE Turret
Create
Duplicate 3 times and change NE to NW, SE and SW
These actors allow the turrets to function by tying the Turret objects to their Turret actors.
You should now have a fully functioning multi-turret structure :D
Feel free to use the attached Test Map or contact me via forum post/IRC if you encounter problems. Keep in mind that I'm a busy person so I may not reply right away, but I'll do my best to answer all questions/concerns that I am aware of :)
Duplicated this great tutorial, only changed the model for the Nexus and the turrets. Basically the Nexus looks like a Dark Shrine now and the Turrets are golf balls (i wanted a glowing ball of light, but it does not seem to work with effects, only with actual items bleh, golf balls come close lol).
Now all works great but one thing i can not figure out. If i start your map the colossus beam is a straight line. If i do the same with my map its just different. It looks like the starter animation from the colossus beam, so it is like 2 beams starting spread out and coming together near the end of the animation.
Any idea why i am getting this? Double checked all beam model related things a few times now, and all seem to 100% match with your values.
Edit: i just found out myself: There is already an Actor Creation in the Turret Beam that is starting with the starting animation. In Your tutorial you wrote "create the following events", so i did a new one. It seems to use the first one in there tho, deleting that did the trick.
Another issue just came up: Morphing Towers with additional Turrets does not seem to go well. I use a Tower with zero additional Turrets that, once upgraded, should have 2 turrets flowing above its top,.. once upgraded again it should be 3. Build alone they all work well, upgraded the turrets do not show up and the effect is coming out of the ground.
Usually i use the "Ability Morph - Morph finished from [old tower] - create" and "Ability Morph - Morph finished to [new tower) - destroy" actors. They do work well for the other 4 Tower in my map. Not for this one tho (it is really just a copy paste of yours basically, just with a multi shot added)
I did not think about that... pretty sure i do not have this. Ill check that out after i get back home. Thanks a a lot! Still confused on what i have to create and copy,.. kinda still having the idea in my head that all this is ONE tower... so i still think i can just create "the tower". And not about 50 extra parts lol
Seems to be working visually, yet the turret is not spinning anymore now. Everything shows up and is working like it should, just no spinning animation on the turret anymore, neither idle nor in fight.
This is exactly why i prefer the Wc3 editor. I was actually hoping the SCII editor would be more like the one in WC3. Sooo much work just to make a turret.. this is why battle.net is full of half-assed/short or limited maps.
This is exactly why i prefer the Wc3 editor. I was actually hoping the SCII editor would be more like the one in WC3. Sooo much work just to make a turret.. this is why battle.net is full of half-assed/short or limited maps.
It may be a lot of work to make a turret for a unit, but it Warcraft 3 you couldn't even do it at all.
I double checked everything and it seems to be identical to yours - but my nexus will only fire the SE cannon (though I thought I saw it fire the NW cannon once when the SW one was out of visual range). Whatever the case only one cannon is firing. Any ideas?
EDIT - OK, I forgot to zero out the weapon backswing. Now I have two turrets firing (SE and NW). The other two track their targets (ie rotate to follow) but never fire. I've triple checked the Site actors, Attack actors, Effects, Weapons, Turrets - no clue.
EDIT2 - If I adjust the order the weapons appear on the Unit -> Weapons+ field I can determine which two turrents fire. This makes no sense. Are units limited to 2 weapons now?
I was able to fix the problem above. I did not remove the "Linked Cooldown" flag from the Weapons. By turning the flag off for all four weapons they all fire fine now.
@Zaradoom - I suspect this is because your Turret Actors aren't tied to the higher level turrets. In other words, your Level 1 turret has actors that tell your extra turrets to "Enable" when it's created, but the other levels don't have the Enable meaning that while the attachments now show up as desired, they can't move because they don't have a Turret Actor linked to them.
The turret can go on anything you want provided that the turret is both the attachment and the object you rotate. Some units actually have turret bones built into their model (like the Siege Tank) which corresponds to a turret already on the model.
Can we use turret for ability too?? I want to make the building turn the turret part to targets when casting.But it always turns the whole one or doesn't turn.
Yes, but you'd have to make the turret the unit and the structure the attachment (so that the attachment hold still while the turret turns to use abilities) or add a weapon to the structure that is only fired when the ability allows it to.
Ability > Set (Buff that enables weapon + Issue Order) > Attack (from Issue Order) > Buff Ends (Disabling the weapon again)
This tutorial has been very useful for multiple things I've been toying around with, but one thing I cant seem to do is add a turret to a missle unit. I can launch the missle and get the turret to show up on the missle, but my turret wont fire. Are missles simply unable to use attacks other than their impact effect?
Missiles can do everything a normal unit can do, but I don't see how a turret would work on your missile. Can you explain the context of the missile? Like why does it have the turret. I can better explain how to create said missile w/turret given this info.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
(If you see typos, please point them out so that I can fix them)
If you're like me, one of the first things you did was add a weapon to a building in the hopes that you could have structures start shooting laser beams at everything that moves. What you probably discovered is that the weapon never fired and you were left with a normal building that just spewed errors at you. This tutorial remedies this problem by walking through the process of creating turrets.
Turret Basics
While we will be working with attached turret models, they aren't required and are merely for aesthetics. The core parts of any turret are:
Turret Hub
Effects Tab
(Because very little changes between objects I'll be having you duplicate frequently.)
Weapons Tab
These are the Turret weapons that will go on the building.
Turrets Tab
You can set these to whatever you'd prefer, but Idle controls the turrets action when not in combat, Arc controls its range of motion, Idle Rate is how quickly the turret rotates out of combat, Rate is how quickly the turret rotates in combat and Start determines the angle the turret begins facing.
Models Tab
Units Tab
Duplicate the Nexus structure and its corresponding Actor. Everything else will be stock or made from scratch.
Actors Tab
Site Operation Actors
Each of these will offset the attached turret models to the specified coordinates.
Model Actors
These actors will create the turret models and upon dying swap in a Death Model rather than snuffing the model from existence the moment the Host dies.
This actor is part of pair. We're going to create its Attack Actors next.
Site Actors
These will allow you to shoot the beams from the turrets by creating reference points.
Attack Actors
The Launch Assets + controls the sounds/models created at the Launch Site and the Impact Map + controls the sounds/models created at the impact point.
Turret Actors
These actors allow the turrets to function by tying the Turret objects to their Turret actors.
You should now have a fully functioning multi-turret structure :D
Feel free to use the attached Test Map or contact me via forum post/IRC if you encounter problems. Keep in mind that I'm a busy person so I may not reply right away, but I'll do my best to answer all questions/concerns that I am aware of :)
Duplicated this great tutorial, only changed the model for the Nexus and the turrets. Basically the Nexus looks like a Dark Shrine now and the Turrets are golf balls (i wanted a glowing ball of light, but it does not seem to work with effects, only with actual items bleh, golf balls come close lol).
Now all works great but one thing i can not figure out. If i start your map the colossus beam is a straight line. If i do the same with my map its just different. It looks like the starter animation from the colossus beam, so it is like 2 beams starting spread out and coming together near the end of the animation.
Any idea why i am getting this? Double checked all beam model related things a few times now, and all seem to 100% match with your values.
Edit: i just found out myself: There is already an Actor Creation in the Turret Beam that is starting with the starting animation. In Your tutorial you wrote "create the following events", so i did a new one. It seems to use the first one in there tho, deleting that did the trick.
Another issue just came up: Morphing Towers with additional Turrets does not seem to go well. I use a Tower with zero additional Turrets that, once upgraded, should have 2 turrets flowing above its top,.. once upgraded again it should be 3. Build alone they all work well, upgraded the turrets do not show up and the effect is coming out of the ground.
Usually i use the "Ability Morph - Morph finished from [old tower] - create" and "Ability Morph - Morph finished to [new tower) - destroy" actors. They do work well for the other 4 Tower in my map. Not for this one tho (it is really just a copy paste of yours basically, just with a multi shot added)
Are you having the additional turrets set to create when the new morph actors are made?
The chain would look something like:
Level 1 Tower > Morph Start > Morph Finish (Create L2 | Destroy L1 | Create Turret(s) ) > repeat
I did not think about that... pretty sure i do not have this. Ill check that out after i get back home. Thanks a a lot! Still confused on what i have to create and copy,.. kinda still having the idea in my head that all this is ONE tower... so i still think i can just create "the tower". And not about 50 extra parts lol
Seems to be working visually, yet the turret is not spinning anymore now. Everything shows up and is working like it should, just no spinning animation on the turret anymore, neither idle nor in fight.
Sooo much work for making turrets.....
Are turrets only limited to buildings?
This is exactly why i prefer the Wc3 editor. I was actually hoping the SCII editor would be more like the one in WC3. Sooo much work just to make a turret.. this is why battle.net is full of half-assed/short or limited maps.
No. Many units already have turrets.
It may be a lot of work to make a turret for a unit, but it Warcraft 3 you couldn't even do it at all.
Maybe, but it also didn't take a dozen steps to make a new unit, either. This editor is more complicated than it needs to be.
I double checked everything and it seems to be identical to yours - but my nexus will only fire the SE cannon (though I thought I saw it fire the NW cannon once when the SW one was out of visual range). Whatever the case only one cannon is firing. Any ideas?
EDIT - OK, I forgot to zero out the weapon backswing. Now I have two turrets firing (SE and NW). The other two track their targets (ie rotate to follow) but never fire. I've triple checked the Site actors, Attack actors, Effects, Weapons, Turrets - no clue.
EDIT2 - If I adjust the order the weapons appear on the Unit -> Weapons+ field I can determine which two turrents fire. This makes no sense. Are units limited to 2 weapons now?
I was able to fix the problem above. I did not remove the "Linked Cooldown" flag from the Weapons. By turning the flag off for all four weapons they all fire fine now.
@Zaradoom - I suspect this is because your Turret Actors aren't tied to the higher level turrets. In other words, your Level 1 turret has actors that tell your extra turrets to "Enable" when it's created, but the other levels don't have the Enable meaning that while the attachments now show up as desired, they can't move because they don't have a Turret Actor linked to them.
@ProzaicMuze: Go
If I wanted to put a single turret on a movable unit would this method work? Assuming of course tweaks are made to suit the different unit.
The turret can go on anything you want provided that the turret is both the attachment and the object you rotate. Some units actually have turret bones built into their model (like the Siege Tank) which corresponds to a turret already on the model.
Can we use turret for ability too?? I want to make the building turn the turret part to targets when casting.But it always turns the whole one or doesn't turn.
Yes, but you'd have to make the turret the unit and the structure the attachment (so that the attachment hold still while the turret turns to use abilities) or add a weapon to the structure that is only fired when the ability allows it to.
Ability > Set (Buff that enables weapon + Issue Order) > Attack (from Issue Order) > Buff Ends (Disabling the weapon again)
This tutorial has been very useful for multiple things I've been toying around with, but one thing I cant seem to do is add a turret to a missle unit. I can launch the missle and get the turret to show up on the missle, but my turret wont fire. Are missles simply unable to use attacks other than their impact effect?
Missiles can do everything a normal unit can do, but I don't see how a turret would work on your missile. Can you explain the context of the missile? Like why does it have the turret. I can better explain how to create said missile w/turret given this info.