I successfully made it so my unit can build an auto turret, but when he goes to construct it, there is no model. It looks like he is just building nothing...
How do I make it so there is a model there?
I know this can be done, because on the map Overrun, he has it working.
Well that's strange. Bug perhaps... Or maybe the your build unit isn't actually "constructing"
Guess you could create another actor then use the normal Terran construction... link it when construction starts
Find your actor for auto turret
Actors - Event
{Add new Event}
Event: Construction | YOUR_UNIT | Start
Term: Create [Actor] (CREATED_ACTOR)
go to your CREATED_ACTOR (model)
Attach a model to it
Event: Actor Creation
Term: Create
Ok I don't understand. When you create an actor. What do I do?
Field AT Construct
Actor - Action Flags
Actor - Aliases
Actor - Beam Scope Caster
Actor - Copy Source
Actor - Filter
Actor - Flags
Actor - Fog Visibility Snapshot
Actor - Lifetime 0.0000
Actor - Sharing None
Art - Accuracy Half Arc -1
Art - Acquisition Half Arc -1
Art - Acquisition Pitch Half Arc -1
Art - Beam
Art - Container Model
Art - Impact Model
Art - Impact Model Reaction
Art - Launch Model GenericAttackLaunchModel
Art - Missile
Art - Shield Flash Type Full
Art - Shield Ripple Scale Factor 1.0000
Attachment - Container Attachment Query + Ignored
Attachment - Container Site
Attachment - Container Site Operations + Disabled:Disabled
Attachment - Damage Attachment Query + AMFilterTargetVolumes AMArcTestWeapon AMVolumesWeightedPick:Center
Attachment - Damage Reattachment Query + Ignored
Attachment - Impact Attachment Query + Ignored
Attachment - Impact Reattachment Query + Ignored
Attachment - Launch Attachment Query + Ignored
Combat - Container Assets + (1.000000)
Combat - Damage Map + (||||||||||):((1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)):(||||||||||):(UnknownActorDamage (Unknown)|UnknownActorDamageDirt (Unknown)|UnknownActorDamageRock (Unknown)|UnknownActorDamageSnow (Unknown)|UnknownActorDamageSand (Unknown)|UnknownActorDamageWater (Unknown)|UnknownActorDamageFlesh (Unknown)||UnknownActorDamageMetal (Unknown)|UnknownActorDamageShield (Unknown)|):(UnknownActorDamageReaction (Unknown)|UnknownActorDamageReactionDirt (Unknown)|UnknownActorDamageReactionRock (Unknown)|UnknownActorDamageReactionSnow (Unknown)|UnknownActorDamageReactionSand (Unknown)|UnknownActorDamageReactionWater (Unknown)|UnknownActorDamageReactionFlesh (Unknown)||UnknownActorDamageReactionMetal (Unknown)|UnknownActorDamageReactionShield (Unknown)|):(||||||||||):((1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000))
Combat - Damage Model GenericAttackModel
Combat - Damage Model Reaction GenericAttackDamageModelReaction
Combat - Damage Site GenericAttackDamageSite
Combat - Damage Site Operations Reaction + Disabled:Disabled
Combat - Damage Site Ops + SOpAttachHarness SOpForwardLaunchGuideDamage SOpPatch10:Disabled:Disabled
Combat - Launch Assets + UnknownActorLaunch (Unknown):(1.000000):UnknownActorLaunch (Unknown)
Combat - Weapon Fire Tracking Time 1.0000
Editor - Editor Categories
Editor - Editor Comment
Editor - Editor Description
Editor - Editor Name AT Construct
Editor - Editor Prefix
Editor - Editor Suffix
Event - Events +
Event - Macros
Event - Remove +
Event - Terms
Hosting - Host Supporter + Implicit:Implicit:Disabled
Properties - Accepted Property Transfers Cloak Effect, Local Tint Color, Opacity, Physics State, Scale, Scale Variance, Team Color, Tint Color, Visibility, Warp Group
Properties - Accepted Transfers
Properties - Inherit Type Continuous
Properties - Inherited Properties Warp Group
Sound - Container Sound
Sound - Damage Sound GenericAttackSound
Sound - Impact Sound
Sound - Launch Sound GenericAttackLaunchSound
Target - Impact Guide Alias
Target - Impact Map + (||||||||||):((1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)):(||||||||||):(||||||||||):(||||||||||):(||||||||||):((1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000)|(1.000000))
Target - Impact Point Site
Target - Impact Point Site Operations + Disabled:Disabled
Target - Impact Site
Target - Impact Site Fallback
Target - Impact Site Operations Reaction + Disabled:Disabled
Target - Impact Site Ops + Disabled:Disabled
Target - Launch Guide Alias
Target - Launch Request + Implicit:Implicit:Disabled
Target - Launch Site
Target - Launch Site Fallback GenericAttackLaunchFallbackSite
Target - Launch Site Ops + Disabled:Disabled
These are the things I can edit. I don't know what I need to do and I can't figure out how to attach a model to the actor.
Also, what's weird is when the unit shows up, it's not rotating, but when I create a auto turret with triggers or place it on the editor, it spins... So don't get this :\
Building construction is somewhat complicated. There are actually TWO actors for any building that's being constructed, one for the "scaffolding" and one for the building itself. Each of those has an associated Progress actor that manages the animation state relative to the building's progress.
Dig around with the actors for some of the existing buildings to see how it works. You can reuse most of that stuff by adding a couple events to the existing actors.
Building construction is somewhat complicated. There are actually TWO actors for any building that's being constructed, one for the "scaffolding" and one for the building itself. Each of those has an associated Progress actor that manages the animation state relative to the building's progress.
Dig around with the actors for some of the existing buildings to see how it works. You can reuse most of that stuff by adding a couple events to the existing actors.
Yeah that's why I told him to do create another actor and link it. However, it's not really complex when you think about it. It's the Unit construction event, that stops that actor to be displayed while constructing event occurs. I don't see any why Blizzard programmed this that way or any programmer for that matter. Couldn't they just create an actor when the actual unit birth occurs and create another actor when the actual construction (visible event) begins. Why put a construction "invisible event" there? Did they really think it will be "less" ambiguous that way?
Yeah that's why I told him to do create another actor and link it. However, it's not really complex when you think about it. It's the Unit construction event, that stops that actor to be displayed while constructing event occurs. I don't see any why Blizzard programmed this that way or any programmer for that matter. Couldn't they just create an actor when the actual unit birth occurs and create another actor when the actual construction (visible event) begins. Why put a construction "invisible event" there? Did they really think it will be "less" ambiguous that way?
The actors are set up that way for a reason. Look carefully at a Terran building animation - there are really two models being displayed, one for the scaffolding, and one for the building itself. The Progress actors are used to sync the animations with the construction stages.
Once you get how it works, it's not that complicated. But the mistake people make is looking at the "Model - Build" field and thinking that's all there is to it.
The actors are set up that way for a reason. Look carefully at a Terran building animation - there are really two models being displayed, one for the scaffolding, and one for the building itself. The Progress actors are used to sync the animations with the construction stages.
Once you get how it works, it's not that complicated. But the mistake people make is looking at the "Model - Build" field and thinking that's all there is to it.
That's not a good reason. There is much more simpler way of doing it. Blizzard has set up this separation between actors and units for visual flexibility, why not just make 2 separate actors? Wait... they did! Then why set up an unoptional invisible actor in an event? Why now just make events that actually corresponds to what is happening?.
To simply put, This is what Blizzard has done:
Actor Unit
Construction Start event occurs (hides Unit actor) -> Create
Construction Start event occurs -> create unitBuild actor
Actor UnitBuild
Construction End event occurse -> Destroy unitBuild Actor
This is what even a minimum waged programmer would have done:
Actor UnitBuild
Construction Start event occurs (does not hide Unit actor) -> Create
Construction End event occurs -> Destroy unitBuild Actor
Actor Unit
Birth Unit -> Create
I can't think of any good reason why it was done this way, it's not logical or chronological. However it's possible that Actors are actually replacements of a previous system that was combination of units and actors (in the same struct variable). So it was compulsory to create a base actor for the unit before adding another actor to it. Then this would make a lot of sense.
When I tried implementing construction from scratch I did it the simplest possible way I could but there were visual artifacts - flashing in between the construction animation finishing and the final unit model appearing. I suspect the convolution is due to the fact that construction end/unit birth events might occur on different frames, and the whole thing is set up to avoid the model temporarily disappearing in between those events being fired.
When I tried implementing construction from scratch I did it the simplest possible way I could but there were visual artifacts - flashing in between the construction animation finishing and the final unit model appearing. I suspect the convolution is due to the fact that construction end/unit birth events might occur on different frames, and the whole thing is set up to avoid the model temporarily disappearing in between those events being fired.
However, that's the thing... I thought about that and tested it. It doesn't O_O. Two actor events executes on the same frame at all times. Even on slower it looks the same. Then again it's obvious, because if it's not all the actor events execute on the same frame, the other actors will have visual defects.
I suspect the "flash" is from the fact that construction event automatically hides the actor. So it must reappear. Even if it was done in different frame (though it isn't), isn't better to fix so they execute on the same frame than creating a hotfix for it? That would be even worse...
Ok what the hell am I doing wrong... I don't see where the problem is...
This is the actor I created for the construction animation. I copied the construction animation from a bunker being built and changed the model/name/ ETC:
Field Auto Turret Build
Actor - Add To Proximity System Enabled
Actor - Aliases (_Snapshot|_TerranBuildModel)
Actor - Copy Source
Actor - Filter
Actor - Flags
Actor - Fog Visibility Snapshot
Actor - Local Offset For 2nd Visibility Test (0.000000,0.000000,0.000000)
Actor - Sharing None
Animation - Animation Blend Time -1.0000
Art - Auto Scale Factor 0.0000
Art - Model Auto Turret Build
Art - Model Flags Allow Hit Test, Needs Volume Monitor, Use Synchronous Seed
Art - Scale (1.000000)
Editor - Editor Categories DoodadType:NotDoodad
Editor - Editor Comment
Editor - Editor Description
Editor - Editor Name Auto Turret Build
Editor - Editor Prefix
Editor - Editor Suffix
Event - Event Footprint +
Event - Event Sound +
Event - Events + (UnitConstruction.*.Finish|UnitConstruction.*.Cancel|ActorOrphan|ActorCreation):(|||):(Destroy|Destroy|Destroy|Create TerranConstructionAttached)
Event - Macros
Event - Remove +
Event - Terms
Hosting - Host + _Selectable:Implicit:Implicit:Disabled
Hosting - Host For Properties + Implicit:Implicit:Disabled
Hosting - Host Site Operations + SOpShadow TerranBuildingFacing:Disabled:Disabled
Hosting - Host Supporter + Implicit:Implicit:Disabled
Hosting - Hosted Attachments +
Properties - Accepted Property Transfers Cloak Effect, Local Tint Color, Opacity, Physics State, Scale, Scale Variance, Team Color, Tint Color, Visibility, Warp Group
Properties - Accepted Transfers Position, Rotation
Properties - Inherit Type Continuous
Properties - Inherited Properties Cloak Effect, Opacity, Scale, Team Color, Tint Color, Visibility, Warp Group
This is the unit's actual ACTOR:
Field Auto Turret
Actor - Add To Proximity System Enabled
Actor - Aliases (_Unit|_Selectable)
Actor - Copy Source _Unit
Actor - Filter
Actor - Flags
Actor - Fog Visibility Snapshot
Actor - Local Offset For 2nd Visibility Test (0.000000,0.000000,0.000000)
Actor - Portrait Actor PortraitActor (Unknown)
Actor - Sharing None
Animation - Animation Blend Time -1.0000
Animation - Animation Turn Duration 0.0000
Animation - Baselines + (Stand|Walk):(-1.0000|-1.0000):(-1.0000|-1.0000)
Animation - Glossary Animation Stand
Animation - Stand Animation Turn Time Scale Minimum 0.0000
Animation - Variance Window Stand 1.0000
Animation - Variance Window Stand Intro 0.3300
Animation - Variance Window Walk 1.0000
Animation - Variance Window Walk Intro 0.3300
Animation - Variance Window Walk Outro 0.3300
Animation - Walk Animation Movement Speed 3.75
Art - Auto Scale Factor 0.0000
Art - Model Auto Turret
Art - Model (Build) Auto Turret
Art - Model (Editor) Auto Turret
Art - Model (Placement) Auto Turret Placement
Art - Model (Portrait) Portrait - Adjutant
Art - Model Flags Allow Hit Test, Has Player Decals, Needs Volume Monitor, Use Synchronous Seed
Art - Placement Model PlacementModel
Art - Random Scale Range (1.000000,1.000000)
Art - Scale (1.000000)
Combat - Custom Death + (||):(Protoss Small Unit Death|Terran Small Unit Death|Zerg Small Unit Death):(||):((-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)):(||):(AntiGravProtoss|AntiGravTerran|AntiGravZerg)
Combat - Death Actor Model UnitDeathModel
Combat - Death Actor Model Low UnitDeathModelUnscaled
Combat - Death Actor Sound UnitDeathSound
Combat - Death Actor Voice UnitDeathVoice
Combat - Death Effects + (Death||||Death, Eat||Death, Eviscerate|Death, Fire||||Death, Silent Kill|Death, Squish|||Death|):(Auto Turret Death|||||||||||||||Terran Building Death|):(Raven_AutoTurretExplode|||||||||||||||Raven_AutoTurretExplode|):((-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)|(-1.000000,-1.000000)):(AutoTurretDeathVoice (Unknown)||||||||||||||||)
Editor - Editor Animation
Editor - Editor Categories DoodadType:NotDoodad
Editor - Editor Comment
Auto Turret ...........................................................................
Editor - Editor Description
Editor - Editor Name Auto Turret
Editor - Editor Prefix
Editor - Editor Suffix
Event - Event Footprint + ():(UnitFootprint (Unknown)):(AutoTurretFootprint (Unknown))
Event - Event Sound + ():(UnitSound (Unknown)):()
Event - Events + (UnitBirth.AutoTurret|UnitBirth.Engineer|UnitRevive.Engineer|UnitConstruction.Engineer.Start|UnitConstruction.Engineer|AnimDone.*.Missing; AnimName ConstructionDeath|ActorCreation; ValidateUnit IsFlying; Option Shadow Low; CompareField ::Main UnitFlags[e_actorUnitFlagShowBlobShadow] Eq 1|ActorCreation; ValidateUnit IsNotFlying; Option Shadow Low; CompareField ::Main UnitFlags[e_actorUnitFlagShowBlobShadow] Eq 1|PreTargetingUpdate.*.Start; ValidateUnit IsNotFlying|PreTargetingUpdate.*.Stop|PreTargetingUpdate.*.Start; ValidateUnit IsFlying|PreTargetingUpdate.*.Stop|CursorUpdate.*.Start; ValidateUnit IsFlying|CursorUpdate.*.Stop; ValidateUnit IsFlying|StatusOn.*.FlyerHelper; FlyerHelperEnabled|StatusOff.*.FlyerHelper; ScopeContains FlyerHelperSplat|FlyerHelperChange; FlyerHelperEnabled; HasStatus FlyerHelper|FlyerHelperChange; !FlyerHelperEnabled; HasStatus FlyerHelper|UnitBirth.*.Normal|UnitFidget|UnitMovementUpdate.*.Walk|UnitDetectedByViewer.*.On; ValidateUnit IsHallucination|UnitDetectedByViewer.*.Off; ValidateUnit IsHallucination|UnitDeathCustomize; ValidateUnit HasAntiGravProtoss|UnitDeathCustomize; ValidateUnit HasAntiGravTerran|UnitDeathCustomize; ValidateUnit HasAntiGravZerg|Behavior.PhoenixAntiGrav.On|Behavior.PhoenixAntiGrav.Off|UnitTaunt.*.Start; Taunt|UnitTaunt.*.Stop; Taunt|UnitTaunt.*.Start; Taunt Dance|UnitTaunt.*.Stop; Taunt Dance|Abil.attack.ReadyStart|WeaponStart.*.AttackStart|WeaponStop.*.AttackStop|Abil.attack.ReadyStop|Behavior.Precursor.Off|Behavior.Precursor.Off|WeaponStart.*.AttackStart):(|||||||||ModelPretargetGround||GroundPreSelection||||FlyerHelperSplat||FlyerHelperSplat||||_HallucinationTinter|_HallucinationTinter||||||||||||||||):(Create SoundEmitter AutoTurret_Ambience|Create|Create|Create AutoTurretBuild|AnimPlay ConstructionDeath Stand,Birth,Death FullMatch|Destroy|Create FlyerShadow|Create GroundShadow|Create ModelPretargetGround|Destroy|Create GroundPreSelection|Destroy|StatusSet FlyerHelper 1|StatusSet FlyerHelper 0|Create FlyerHelperSplat|Destroy|Create FlyerHelperSplat|Destroy|AnimPlay Birth Birth 0 0.000000|AnimPlay Fidget Fidget|AnimClear Fidget|Signal HallucinationTintOn|Signal HallucinationTintOff|DeathCustomize AntiGravProtoss|DeathCustomize AntiGravTerran|DeathCustomize AntiGravZerg|ModelSuddenMotionStart|ModelSuddenMotionStop|AnimPlay Cheer Stand,Victory|AnimClear Cheer|AnimPlay Dance Stand,Dance|AnimClear Dance|AnimGroupApply Ready|AnimBracketStart Attack Attack|AnimBracketStop Attack|AnimGroupRemove Ready|Create AutoTurretReleaseMissileImpact|AnimPlay Birth Birth|AnimClear Birth)
Event - Macros (GlobalLoopMacro|DeadAnimationMacro)
Event - Remove +
Event - Terms
Hosting - Host + Implicit:Implicit:Disabled
Hosting - Host For Properties + Implicit:Implicit:Disabled
Hosting - Host Site Operations + Disabled:Disabled
Hosting - Host Supporter + Implicit:Implicit:Disabled
Hosting - Hosted Attachments +
Properties - Accepted Property Transfers Cloak Effect, Local Tint Color, Opacity, Physics State, Scale, Team Color, Tint Color, Visibility, Warp Group
Properties - Accepted Transfers Animation Properties, Position, Rotation, Textures, Status
Properties - Inherit Type Continuous
Properties - Inherited Properties Warp Group
Sound - Ability Sounds +
Sound - Group Sound Threshold 2
Sound - Group Sounds (|||AutoTurret_GroupWhat (Unknown)|AutoTurret_GroupYes (Unknown)|AutoTurret_GroupAttack (Unknown)||||AutoTurret_GroupBoard (Unknown)||||)
Sound - Placement Sound Terran_BuildingPlacement
Sound - Sounds (Raven_AutoTurretBirth|Raven_AutoTurretReady|AutoTurret_Help (Unknown)|Raven_AutoTurretWhat|AutoTurret_Yes (Unknown)|AutoTurret_Attack (Unknown)|AutoTurret_Pissed (Unknown)|AutoTurret_Movement (Unknown)|AutoTurret_Turning (Unknown)|AutoTurret_Board (Unknown)||AutoTurret_Click (Unknown)|AutoTurret_ClickError (Unknown)|AutoTurret_Highlight (Unknown))
UI - Bar Distance 34
UI - Bar Height 7
UI - Bar Offset 50
UI - Bar Width 60
UI - Cooldown Display
UI - Errors + (Can't place, location invalid):():(Raven_Pissed):()
UI - Group Icon Layer (Assets\Textures\Wireframe-Terran-AutoTurret.dds)
UI - Hero Icon Assets\Textures\btn-building-terran-autoturret.dds
UI - Highlight Tooltip Raven-Auto-Turret
UI - Life Armor Icon Assets\Textures\btn-upgrade-terran-buildingarmor.dds
UI - Minimap Icon
UI - Name Offset 30
UI - Select Ability Command
UI - Shield Armor Icon Assets\Textures\btn-upgrade-protoss-shieldslevel0.dds
UI - Shield Layer
UI - Status Bar Flags Shields, Life, Energy, Cargo, Progress, Duration
UI - Status Colors + ((255,0,0,0)|(255,0,0,0)|(255,0,0,0)|(255,0,0,0)|(255,0,0,0)|(255,0,0,0)):((255,80,80,80)|(255,80,80,80)|(255,80,80,80)|(255,77,60,15)|(255,80,80,80)|(255,80,80,80)):(((255,0,0,255))|((255,208,34,0)|(255,208,34,0)|(255,229,129,0)|(255,229,129,0)|(255,229,221,0)|(255,229,221,0)|(255,22,229,0)|(255,22,229,0))|((255,150,40,220))|((255,255,200,50))|((255,0,200,200))|((255,200,200,200)))
UI - Unit Border Normal Color (NULL)
UI - Unit Border Subgroup Color (NULL)
UI - Unit Icon Assets\Textures\btn-building-terran-autoturret.dds
UI - Unit Kill Rank +
UI - Wireframe Layer (Assets\Textures\Wireframe-Terran-AutoTurret.dds)
Unit - Unit Flags Stand Animation Birth Variation
The events in the actor for the construction is:
The construction event is:
UnitConstruction.Engineer.Start
Msg Type: Construction
Source Name: Auto-Turret
Sub Name: Start
Then below that:
Target = blank
Msg Type = Create
Parameters:
Name: AutoTurretBuild (Type is Actor)
Content: (||)
What am I doing wrong as this is seriously driving me crazy!!!!!
ALSO, what's weird is when the unit shows up, it's not rotating, but when I create a auto turret with triggers or place it on the editor, it spins.
I'd tell you exactly what I did to make it work the way I did, but that was like 3 - 4 weeks ago, I've forgotten. :X Seems like you got it working though. My turret doesn't really have levels, so I don't know about that spinning issue you have.
I ran into this bug as well. In some circumstances the Turret Enable actor event is not fired after a unit morph, so the turret is never attached to the model. I made a post about this a few days ago and didn't get any responses and I haven't been able to find a solution, or isolate what exactly causes the problem - because certain unit morphs work OK (for example, warp prisms and siege tanks.)
I ran into this bug as well. In some circumstances the Turret Enable actor event is not fired after a unit morph, so the turret is never attached to the model. I made a post about this a few days ago and didn't get any responses and I haven't been able to find a solution, or isolate what exactly causes the problem - because certain unit morphs work OK (for example, warp prisms and siege tanks.)
Yep, siege tank units have two different turrets and warp prisms only have one turret when transformed and none when not transformed. So this is my suggestion.
I'm on my laptop so I can't test it, but try making a different turret for each level. (If you have already done this, use the same turret for each level and test that :D)
I successfully made it so my unit can build an auto turret, but when he goes to construct it, there is no model. It looks like he is just building nothing...
How do I make it so there is a model there?
I know this can be done, because on the map Overrun, he has it working.
Please help :D
Find your actor for auto turret
Actors - Event
{Add new Event}
Event: Construction | YOUR_UNIT | Start
Term: Create
@zifoon: Go
[URL=http://img291.imageshack.us/i/66847544.png/][IMG]http://img291.imageshack.us/img291/3148/66847544.png[/IMG][/URL]
[URL=http://img130.imageshack.us/i/34012032.png/][IMG]http://img130.imageshack.us/img130/797/34012032.png[/IMG][/URL]
I did what you said, I think, look above, and it's still not building anything, model wise.
Well that's strange. Bug perhaps... Or maybe the your build unit isn't actually "constructing"
Guess you could create another actor then use the normal Terran construction... link it when construction starts
Find your actor for auto turret
Actors - Event
{Add new Event}
Event: Construction | YOUR_UNIT | Start
Term: Create [Actor] (CREATED_ACTOR)
go to your CREATED_ACTOR (model)
Attach a model to it
Event: Actor Creation
Term: Create
Event: Construction.Finish
Term: Destroy
Ok I don't understand. When you create an actor. What do I do?
These are the things I can edit. I don't know what I need to do and I can't figure out how to attach a model to the actor.
Also, what's weird is when the unit shows up, it's not rotating, but when I create a auto turret with triggers or place it on the editor, it spins... So don't get this :\
@Zero0018: Go just a duplicate a random building and change the model =_=
@zifoon: Go
Ok, so when you say duplicate a random building are you talking about a random building actor or the actual unit?
I duplicated the armory actor and changed it to:
Does it matter that there is still ton's of other model's attached to this actor and if so, how do you remove them?
Building construction is somewhat complicated. There are actually TWO actors for any building that's being constructed, one for the "scaffolding" and one for the building itself. Each of those has an associated Progress actor that manages the animation state relative to the building's progress.
Dig around with the actors for some of the existing buildings to see how it works. You can reuse most of that stuff by adding a couple events to the existing actors.
Yeah that's why I told him to do create another actor and link it. However, it's not really complex when you think about it. It's the Unit construction event, that stops that actor to be displayed while constructing event occurs. I don't see any why Blizzard programmed this that way or any programmer for that matter. Couldn't they just create an actor when the actual unit birth occurs and create another actor when the actual construction (visible event) begins. Why put a construction "invisible event" there? Did they really think it will be "less" ambiguous that way?
The actors are set up that way for a reason. Look carefully at a Terran building animation - there are really two models being displayed, one for the scaffolding, and one for the building itself. The Progress actors are used to sync the animations with the construction stages.
Once you get how it works, it's not that complicated. But the mistake people make is looking at the "Model - Build" field and thinking that's all there is to it.
That's not a good reason. There is much more simpler way of doing it. Blizzard has set up this separation between actors and units for visual flexibility, why not just make 2 separate actors? Wait... they did! Then why set up an unoptional invisible actor in an event? Why now just make events that actually corresponds to what is happening?.
To simply put,
This is what Blizzard has done:
Actor Unit
Construction Start event occurs (hides Unit actor) -> Create
Construction Start event occurs -> create unitBuild actor
Actor UnitBuild
Construction End event occurse -> Destroy unitBuild Actor
This is what even a minimum waged programmer would have done:
Actor UnitBuild
Construction Start event occurs (does not hide Unit actor) -> Create
Construction End event occurs -> Destroy unitBuild Actor
Actor Unit
Birth Unit -> Create
I can't think of any good reason why it was done this way, it's not logical or chronological. However it's possible that Actors are actually replacements of a previous system that was combination of units and actors (in the same struct variable). So it was compulsory to create a base actor for the unit before adding another actor to it. Then this would make a lot of sense.
When I tried implementing construction from scratch I did it the simplest possible way I could but there were visual artifacts - flashing in between the construction animation finishing and the final unit model appearing. I suspect the convolution is due to the fact that construction end/unit birth events might occur on different frames, and the whole thing is set up to avoid the model temporarily disappearing in between those events being fired.
However, that's the thing... I thought about that and tested it. It doesn't O_O. Two actor events executes on the same frame at all times. Even on slower it looks the same. Then again it's obvious, because if it's not all the actor events execute on the same frame, the other actors will have visual defects.
I suspect the "flash" is from the fact that construction event automatically hides the actor. So it must reappear. Even if it was done in different frame (though it isn't), isn't better to fix so they execute on the same frame than creating a hotfix for it? That would be even worse...
Ok what the hell am I doing wrong... I don't see where the problem is...
This is the actor I created for the construction animation. I copied the construction animation from a bunker being built and changed the model/name/ ETC:
This is the unit's actual ACTOR:
The events in the actor for the construction is:
The construction event is:
What am I doing wrong as this is seriously driving me crazy!!!!!
ALSO, what's weird is when the unit shows up, it's not rotating, but when I create a auto turret with triggers or place it on the editor, it spins.
Ok, so I figured it out. It looks like you can't just create units, you have to duplicate pre-existing ones and just change every aspect of them.
I got it working, but what's weird is the lv 2 and lv 3 version of the EXACT same settings the turret is not rotating....
How do I fix this?
@Zero0018: Go
I'd tell you exactly what I did to make it work the way I did, but that was like 3 - 4 weeks ago, I've forgotten. :X Seems like you got it working though. My turret doesn't really have levels, so I don't know about that spinning issue you have.
Best of luck!
Well the levels are just another unit with better stats. The model isn't rotating like the 1st unit. It's very weird
@Zero0018: Go
I ran into this bug as well. In some circumstances the Turret Enable actor event is not fired after a unit morph, so the turret is never attached to the model. I made a post about this a few days ago and didn't get any responses and I haven't been able to find a solution, or isolate what exactly causes the problem - because certain unit morphs work OK (for example, warp prisms and siege tanks.)
Yep, siege tank units have two different turrets and warp prisms only have one turret when transformed and none when not transformed. So this is my suggestion.
I'm on my laptop so I can't test it, but try making a different turret for each level. (If you have already done this, use the same turret for each level and test that :D)
@zifoon: Go
I tried that, didn't work.