Difference between revisions of "Attaching a Model to a Unit"

From HIVE
Jump to navigation Jump to search
m (1 revision: StarEdit.net Wiki)
m
 
Line 1: Line 1:
 
The following tutorial is a step-by-step process for attaching an model (in this case an [[OmniLight]]) to a unit. There are two sections based on whether you'd prefer to use triggers or the data editor. In both, I'll be using a Zealot as my unit, but obviously you can use whichever unit you'd like.
 
The following tutorial is a step-by-step process for attaching an model (in this case an [[OmniLight]]) to a unit. There are two sections based on whether you'd prefer to use triggers or the data editor. In both, I'll be using a Zealot as my unit, but obviously you can use whichever unit you'd like.
  
==Attaching with [[Triggers]]==
+
=Attaching with [[Triggers]]=
 
[[File:OmniGarrosh.png|250px|thumb|right|A blue OmniLight attached to a model of Garrosh from World of WarCraft.]]
 
[[File:OmniGarrosh.png|250px|thumb|right|A blue OmniLight attached to a model of Garrosh from World of WarCraft.]]
 
#Place your hero unit on the map (again in this example I've chosen a Zealot).
 
#Place your hero unit on the map (again in this example I've chosen a Zealot).
Line 14: Line 14:
 
#Congratulations, you now have a light blue aura around your hero!
 
#Congratulations, you now have a light blue aura around your hero!
  
==Attaching with the [[Data Editor]]==
+
=Attaching with the [[Data Editor]]=
 
The following is written assuming you have the "Show Table View" button pressed next to the right "Search" bar of the Data Editor. Again, we'll be attaching an OmniLight to a Zealot in this example.
 
The following is written assuming you have the "Show Table View" button pressed next to the right "Search" bar of the Data Editor. Again, we'll be attaching an OmniLight to a Zealot in this example.
  
===Creating the [[Model]]===
+
==Creating the [[Model]]==
 
#Go into the [[Data Editor]] (F7) and under "Data Type:" select "'''Models'''."
 
#Go into the [[Data Editor]] (F7) and under "Data Type:" select "'''Models'''."
 
#Right-click in the left box (on any of the existing "Models" if you'd like) and select "'''Add Object...'''" (or press Ctrl+=). Let's name this Model "OmniLight Aura" with the type set to "'''Generic'''" and based on "'''OneShotSpellFX'''." Make sure you also click "Suggest" for the ID. Click "OK" and you now have a brand new model to modify.
 
#Right-click in the left box (on any of the existing "Models" if you'd like) and select "'''Add Object...'''" (or press Ctrl+=). Let's name this Model "OmniLight Aura" with the type set to "'''Generic'''" and based on "'''OneShotSpellFX'''." Make sure you also click "Suggest" for the ID. Click "OK" and you now have a brand new model to modify.
 
#With the "OmniLight Aura" model selected, find "Model" in the box on the right. Double-click the space next to it to open an "Object Values" window. Click "Browse..." on the right to open the "Archive Browser" window. Do a quick search for "'''LightOmni'''" and select whichever color you want (in this case, I'll choose "LightOmniRedLarge.m3"). Click "OK" to close the "Archive Browser" and click "OK" once more to close the "Object Values" window.
 
#With the "OmniLight Aura" model selected, find "Model" in the box on the right. Double-click the space next to it to open an "Object Values" window. Click "Browse..." on the right to open the "Archive Browser" window. Do a quick search for "'''LightOmni'''" and select whichever color you want (in this case, I'll choose "LightOmniRedLarge.m3"). Click "OK" to close the "Archive Browser" and click "OK" once more to close the "Object Values" window.
  
===Creating the [[Actor]]===
+
==Creating the [[Actor]]==
 
#Now under "Data Type:" select "'''Actors'''."
 
#Now under "Data Type:" select "'''Actors'''."
 
#Right-click in the left box (on any of the existing "Actors" if you'd like) and select "'''Add Object...'''" (or press Ctrl+=). Name this Actor "OmniLight Aura" with the type set to "'''Model'''" and based on "'''Model Animation Style One Shot'''." Make sure you also click "Suggest" for the ID. Click "OK" and you now have a brand new actor to modify. You should also notice that our "OmniLight Aura" model is automatically linked to this new actor.
 
#Right-click in the left box (on any of the existing "Actors" if you'd like) and select "'''Add Object...'''" (or press Ctrl+=). Name this Actor "OmniLight Aura" with the type set to "'''Model'''" and based on "'''Model Animation Style One Shot'''." Make sure you also click "Suggest" for the ID. Click "OK" and you now have a brand new actor to modify. You should also notice that our "OmniLight Aura" model is automatically linked to this new actor.
Line 34: Line 34:
 
#Congratulations, you should now see a red aura around your Zealot.
 
#Congratulations, you should now see a red aura around your Zealot.
  
==See Also==
+
=See Also=
 
*[[Host Site Operations]]
 
*[[Host Site Operations]]
  

Latest revision as of 18:41, 8 April 2012

The following tutorial is a step-by-step process for attaching an model (in this case an OmniLight) to a unit. There are two sections based on whether you'd prefer to use triggers or the data editor. In both, I'll be using a Zealot as my unit, but obviously you can use whichever unit you'd like.

Attaching with Triggers

A blue OmniLight attached to a model of Garrosh from World of WarCraft.
  1. Place your hero unit on the map (again in this example I've chosen a Zealot).
  2. Open the Trigger editor under Modules > Triggers or press F6. Make sure the Show Libraries (Ctrl+Shift+L) and Use Subviews (Ctrl+Shift+W) buttons are clicked.
  3. In the box on the bottom left of the window, right-click and select New > New Trigger (Ctrl+T). Name this "OmniAttach".
  4. In the box on the right, right-click on Events and select New > New Event. Search for "Map Initialization," select it, and then click "Ok."
  5. Now right-click on Action and select New > New Action. Search for "Attach Model to Unit," select it, and then click "Ok."
  6. Click on "Actor - Attach Model to Head on (Last created unit)," and you should see the action's details in the box on the bottom right.
  7. Double-click on Model: (No Value) and a new window should come up. Search for "Omni" and it should give you all the OmniLight options. For this tutorial, let's choose Light Omni Blue. Click "Ok" and it should now read "Model: Light Omni Blue."
  8. Double-click on AttachPoint: Head and a new window should come up. Search for "Origin," select it, and click "Ok." It should now read "AttachPoint: Origin."
  9. Double-click on Unit: Last Created Unit and a new window should come up. Click on the button next to "Value" and a list of all the pre-placed units should show up underneath. For this tutorial I am using a Zealot, so select "Zealot" and click "Ok."
  10. Congratulations, you now have a light blue aura around your hero!

Attaching with the Data Editor

The following is written assuming you have the "Show Table View" button pressed next to the right "Search" bar of the Data Editor. Again, we'll be attaching an OmniLight to a Zealot in this example.

Creating the Model

  1. Go into the Data Editor (F7) and under "Data Type:" select "Models."
  2. Right-click in the left box (on any of the existing "Models" if you'd like) and select "Add Object..." (or press Ctrl+=). Let's name this Model "OmniLight Aura" with the type set to "Generic" and based on "OneShotSpellFX." Make sure you also click "Suggest" for the ID. Click "OK" and you now have a brand new model to modify.
  3. With the "OmniLight Aura" model selected, find "Model" in the box on the right. Double-click the space next to it to open an "Object Values" window. Click "Browse..." on the right to open the "Archive Browser" window. Do a quick search for "LightOmni" and select whichever color you want (in this case, I'll choose "LightOmniRedLarge.m3"). Click "OK" to close the "Archive Browser" and click "OK" once more to close the "Object Values" window.

Creating the Actor

  1. Now under "Data Type:" select "Actors."
  2. Right-click in the left box (on any of the existing "Actors" if you'd like) and select "Add Object..." (or press Ctrl+=). Name this Actor "OmniLight Aura" with the type set to "Model" and based on "Model Animation Style One Shot." Make sure you also click "Suggest" for the ID. Click "OK" and you now have a brand new actor to modify. You should also notice that our "OmniLight Aura" model is automatically linked to this new actor.
  3. With the "OmniLight Aura" actor selected, find "Event - Events +" in the box on the right. Double-click the space next to it to open an "Object Values" window.
    1. Select "ActorCreation" on the left to bring up details about this event on the right. Click on "Flags: Play Once" on the right. In the box on underneath, uncheck "Play Once" and check "Play Forever."
    2. Now right-click in the box on the left and select "Add Event". Select the newly created event and change the "Msg Type:" to "Unit Birth" and the "Source Name:" to "Zealot." Now select the "ActionImpact" under your newly created event, and change the "Msg Type:" to "Create."
    3. Click "OK" to close the "Object Values" window.
  4. Now find "Hosting - Host +" and double-click the space next to it to open a new "Object Values" window. Under "Subject" click the button next to "Alias" and in the textbox, type in "_Selectable." Click "OK" to close the window.
  5. Now find "Hosting - Host Site Operations +" and double-click on the space next to it to open a new "Object Values" window. Click the green X next to the "Operations" box to add a new value. Change this value to "SOpAttachOrigin" and click "OK" to close the window.
    • As a side note, to see specific attachment points for a certain unit, you can open up the Previewer in "Window > Previewer" (Ctrl+Shift+V). With the Previewer window open, go to "Render > Show Geometry > Attachment Points" (A). Now find whichever unit you would like to check and see the specific points for that unit.
  6. Congratulations, you should now see a red aura around your Zealot.

See Also