Tutorial Data Editor - Making your abilities look good with Actor Events!

Monsterous

In the Shadows, Lurking.
Reaction score
99
One major thing that blocks people in Galaxy is the data editor - mainly the Actors. One key thing that people overlook when trying to work with actors is perhaps the most IMPORTANT part of Actors.



That lil' bunch right there.

Essentially, Actors have their own trigger editor within themselves.
I'll go over the key parts to this area to help make you understand how Actors work.

So lets take a basic example. You have this damage ability. Point, click, damage is dealt. But currently, there are no special effects or sounds.


Not exactly great. So lets fix this up! We'll focus on sound effects for now.
The actor we want is this:


Name/ID - Whatever you want.
Actor Type: Sound (Its the only one of the type, so you cant get confused here)
Based On: You dont have to change this - I haven't had a problem using it like this.

Now, go into your actor, and scroll all the way to the bottom - and choose your Sound. I chose the Ghost EMP Launch sound.


And now, its time to go to the Events part of the Actors. Double click any of the three Events parts - they all go to the same thing. And you should get something empty like this.


The two things we have to do here is to 1. Create the actor and 2. Destroy the actor. So first; we have to create an Event. Right click in the white area and click on "Add Event". Then, two things should pop up.


The Red Square is the Event - which whenever the event happens, the action underneath (The Green Square) will take into effect. Now, we dont want these - so lets change them! If you click on the Event, some options will appear to the right. On the first dropbox, scroll down to Effect. On the second dropbox, scroll down to the effect you want. (In this case, its the damage portion of my ability.). Finally, on the last dropbox, go to Start.


So what do these three things mean? The Msg Type is the type of event. In this case, the sound will play when the effect is started. In other cases, it could be played when an animation is played (AnimPlay), or if the actor is created, (ActorCreation). There are many, many Msg Types to suit whatever it is you want!

Now, the next dropboxes depend on the Msg Type. For the Effect Msg Type, the Source Name is the Effect that links to the Actor. The Sub Name is what part of the effect that will trigger the Event. In this case, it's the start of the effect. If this is left on Any, then the sound would play twice. (Although you wouldnt really notice it - in other Msg Types, using a Sub Name is very critical - you wouldnt want an animation to play multiple times!)

Now, on the Action - change that to Create, and leave it as it is. Your Actor Event should look like this.


If you hit OK, on the bottom left, you can see the actor is now linked to the Effect.


Ok! But we have a problem. At the moment, this ability is fairly short range - so it wont matter as much here. But, what if it was a global ability? What if the caster was on the other side of the map? Alternatively, what if you were making a special effect, and you wanted it on your Caster? Then you can alter the Actor Event! If you Right Click the Event, and hit "Add Term", this will pop up.


Yours wont say "At Caster", it will default to "AnimPlaying". So; click the term, go to the options on the right, and replace "AnimPlaying" with "At". It will default to "At Caster", but you could change that to the location of the Effect, or whatever! You dont need this Term for the Sound in this scenario however, as the two units are fairly close.

The first part of the actor is complete. Now; we have to DESTROY IT! After the sound has played of course. Add a new event, and change the event to "Sound Done". Then change the action to Destroy. Your actor will now destroy itself once the sound has played.

And thats it - the sound actor is now complete. It should look something like this.


Go ahead and test your new non-mute ability!

The next part is to create some special effects. Explosions! Cracks in the ground! Models! This is what will make your ability look awesome. So, create a new Model actor.


Name/Id: Again, whatever you want.
Actor: Model
Based On: ModelAnimationStyleOneShot

Now, for some abilities, you might want to pick ModelAnimationStyleContinuous if you'd like your actor to repeat. In this case, we dont want that to happen. Another thing to note is that there are two of the same type, except one has spaces. Personally, i've had troubles with the spaced version, so use the one without spaces. Why its there i dont really know.

When you've done that, select the model you would like. In this case, i chose the Yamato Cannon explosion.


Now, go to the Actor Events section of the actor. Theres actually stuff there!


Personally, i'd just delete all that. My actors work fine without them - so if im a silly person, do tell me.

Now, create a new event. Change the event to Msg Type "Effect", Source Name <Your Effect>, and Sub Name Start. Add a new term, and change it to "At Effect". Then, for the action, change it to "Create". The actor will now create itself at the damage effect, or in this case, the target unit.

The next part is to make the actor actually do something. Currently, it wont do anything, it'll just spawn and that is it. You have to make it play an animation! But how do you know what animation to play? Go to your selected model, and go to its Model. Double click it, and hit "View in Previewer".


After its loaded, your model will be displayed in the big blue box. You should see a timeline on the bottom right. It will have an animation on it. Right click it to see what other animations your model has.


The model i have chosen has only a Death animation, so i'll have to use that.

Now that i know what animation to use, go back to your Actor Events on your model actor. Create a new event, and change the event to "Actor Creation". Then, for the action, change it to "Animation Play" (It will be shortened to "AnimPlay"). On the options list, it will show numerous things.


You only have to worry about the first three options. The name part i will touch on in a second. Animation Properties is what animation the actor will play when the event is triggered, and Flags are to change the animation in certain ways. I'll let you experiment with the flags as we do not need to use any flags for this.

For the Name part, it will be blank. This part is to identify the Animation with the Actor Event. Click on the Name part, and hit Customize.


This will create a box. Type in whatever you want (I called it Death, just to keep things organised, because my animation being played is a Death animation.). After that, hit the green X, and press OK. You have just created an Identifier.

Now, next to your Name, there should be your Identifier. Now, go to the second option - Animation Properties. On the dropdown menu, select the animation you want. Mine is a simple name - it is just Death. When i select that, a new dropdown menu comes up. You do not have to use it unless your Animation has several words inside it. For example, If your model has three stand animations, and you want a the second animation, it would be Stand, Two.


(If the Animation has only one word, such as the one i want - Death, it would be something like this.)


(If the Animation has more than one words inside, such as Stand Two, it would be this.)

Now, with that done, you only have to create a Destroy Event so the model does not stick around. You want it to be destroyed after the animation has played, so create a new Actor Event. Change the event to "Animation Done", and the action to "Destroy". Here is what it should look like.


And there you go. All done! Your ability now has sound - and a special effect to go with it. Lets see how it looks like now! (Although you cant hear how it looks unless you make it yourself!)

Shazam!

Your ability is now done. And you've learned just a small fragment, but a very important part of Actors. You can even do more! You could change the animation after ones played, you could change its tint and colour to whatever you want, you could change its scale during an animation! You could even go into the Caster's actor, and make it do an animation when the ability is casted, making it look far better.

I hope you've learned much, and i hope i've helped you learn about the incredible power of Actors, and how fundamental they are. Experiment and learn!
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
Can I create an Actor that "trigger" when a unit attack then apply an Effect to the attacker?

the event, I think it is: WeaponStart.*.AttackStart
the term, there is no At term for this event, I guess :(
the action, I can't find any things that suite my need (or I didn't find hard enough)
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
I am not a 100% sure, but Actor's are mostly for visual stuff.

Let me see if I got this right: You want to have a unit A. When any unit attacks unit A, an effect should be applied to the attacking unit?

For this, I would give unit A a behavior with a combat response. Combat responses can be a little bit tricky. Just make sure you put in the effect at the right place and that the location is "defender"(Not 100% sure on this, if the effect is applied on the wrong unit, use attacker instead). This means it checks for when the unit with the behavior takes damage and not the attacking one.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
the damage location field determines how the ability owner reacts with the ability (whether they are the damage source or damage taker) ie: if the damage factor on the damage response is 2.0 and it is set to defender, they will take 2x dmg when the ability fires, if they are attacker, it will treat it more like a crit
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
the damage location field determines how the ability owner reacts with the ability (whether they are the damage source or damage taker) ie: if the damage factor on the damage response is 2.0 and it is set to defender, they will take 2x dmg when the ability fires, if they are attacker, it will treat it more like a crit

There is no ability. The damage response will run an effect either when the unit with the behavior takes damage or when a unit is attacked by the unit with the behavior depending on if the location field is set to attacker or defender.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
sorry, behavior, ability, not the same thing but close, i was considering the crit affect applied by my behavior in the map im making an ability because it is in wc3, forgetting it was just a behavior in this
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top