Call To Arms: Attachments

Reaction score
54
Attachments (WIP: 20% complete)



Contributors
  • (None yet!)

Introduction
This tutorial will aim to explain the intricacies of attachments, ranging from placing a Zergling on the head of a Marine to recreating the Uberlisk.​

Prerequisites
  • Working knowledge of object creation: units, actors.
  • Basic knowledge of the Events+ system.

Basics

What is an attachment?
An attachment is the placing of an Actor over an Attachment Point.​
What is an Attachment Point?
An Attachment Point is a special location in a model, designated during the design of the model. Examples of Attachment Point are Head, Weapon and Origin.
You may find an unit's model's attachment points by placing the unit, selecting it, pressing CTRL + SHIFT + V, then pressing A.​
What is a Site Operation (SOp)?
A Site Operation is a type of actor that allows you to perform many neat things on another actor. You can use them to make actors walk upside down, make them jump, make them walk in zig-zags motions, make projectiles spray out, etc. However, we will only use the Site Operation (Attachment) category, which will allow us to specify Attachment Points for use within the Data Editor.
You may find available Site Operations under Actors/Site Operation (Attachment)/CActorSiteOpAttach in the Data Editor. If there is no Site Operation for the particular Attachment Point you need, you may create a new one and specify your desired Attachment Point in the Attachment Query field.​
What are the requirements for an attachment?
  • An Actor: what are we attaching.
  • An Unit: to whom are we attaching.
  • A SOp: where are we attaching.
  • An event: when are we attaching.


A Simple Scenario

Let's attach a Zergling to the head of a Marine.

1) Create a new Actor. Make it of Actor Type Model, based on ModelAddition.
2) Change Art - Model to Zergling. Change Scale to 0.3
3) Change Hosting - Host Site Operations+ to SOpAttachHead.
4) Create a new Event:
Code:
Unit Birth.Marine
->Create
5) Place your marine to see the results:​


attachment.php

"Ahhh! Get it off me!"

Defend the Fortress

The attachment is just a mere Actor. As such, it is impossible for it to have a weapon, much less attack. However, you can work around this.
Take a look at this picture:

attachment.php

"Call down the thunder! Call it down!"

Would you believe that it's the Barrack who is actually dealing the damage? To achieve this, I attached two ghosts to the Attachment Points: Damage 01 & Damage 10 of the Barracks. I gave the Barracks the Ghost's Weapon and added these events to the Ghosts's ModelAddition's Actor:

Code:
WeaponStart.Ghost.AttackStart
->AnimBracketStart Attack Attack
WeaponStop.Ghost.AttackStop
->AnimBracketStop Attack

The result is that it appears that the attachments are the ones dealing damage... pretty neat, huh?

TODO: Figure out how to attach the Ghost Attack actor to the ghosts to produce the firing visual effect. That is, how to attach to an attachment.



Recreating the Uberlisk

Copyright ©2010, TheHelper.net
 

Attachments

  • zergOnMarine.jpg
    zergOnMarine.jpg
    29.4 KB · Views: 507
  • ghostOnTop.jpg
    ghostOnTop.jpg
    37.8 KB · Views: 480
Reaction score
54
Alright guys, let's begin a collaborative research on one of the most requested topics in the forum.
Please feel free to post any finding or details, regardless of how insignificant it may be.
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
160
trying to find the meaning of:

unit -> behavior -> added on units

I assume this has to do with addons like the tech lab... but...

it gives you an effect with the added on unit... such as "250 mm strike cannon"

soooo..?
 
Reaction score
54
It seems to be for applying buffs to an unit when you add-on something to it.

Like, the reactor uses it to buff the Barracks, allowing it to train 2 units at the time.
 

Pragm4

New Member
Reaction score
2
That tutorial was so pro. I also found out that if you put in a bogus SOp*, the editor will automatically delete it.
 

jleips2600

New Member
Reaction score
4
This is indeed an awesome thread. Very informative (however I dont have anything to contribute) =[ Very well laid out as well.

I vote for a sticky on this and anything else with good information that is organized this neatly.
 
Reaction score
54
Thanks for the remarks guys!

We are currently looking for a way to be able to attach units, instead of actors. This is crucial for placing functional units in top of buildings and spine crawlers on the back of the uberlisk. It seems to be that the only the way to accomplish this is by the use of references and scopes.

Any light that could be shed in these (deemed by me, the most obscure features of the editor...) would be greatly appreciated. :)
 

rover2341

Is riding a roller coaster...Wee!
Reaction score
114
Well, cant you just use some triggers but have the unit float x amount different above the building height? Maybe make the unit unclickable and if the building dies kill the unit?
 

SerraAvenger

Cuz I can
Reaction score
234
might create too much traffic tho...
I don't know exactly how blizz handles code, but I don't think that stuff like this actually creates any traffic.
problem would be to get the attachment to follow the main unit though. Using periodic stuff shouldn't work (need >25 fps).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top