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

Monsterous

In the Shadows, Lurking.
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 ! ---
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
Staff member
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.
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
Staff member
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.
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.
  • tom_mai78101 tom_mai78101:
    Hmm, about the Headline News, I noticed threads are being moved into the subforum (Health News, Environmental News, etc.). When that happens, the TH Forum Home page loses the articles, and instead would show old articles posted 1 or 2 weeks ago.
  • tom_mai78101 tom_mai78101:
    What do we do with the Home page?
  • Ghan Ghan:
    I added those forums to the filter for that widget.
    +1
  • tom_mai78101 tom_mai78101:
    Oh nice. They're back. Thanks.
  • tom_mai78101 tom_mai78101:
    Now I think it makes more sense for me to put news in their own subforums, without worry.
  • The Helper The Helper:
    Awesome Ghan thanks! I was purposely not moving the first 15 news articles in Headline news to the different subforums but I guess I don't have to do that now?
  • tom_mai78101 tom_mai78101:
    Question: Is there a way to remove thread redirects? It creates a copy of the moved thread and takes up space, and I am leaning towards wanting to remove them in the Headline News. But if they have an expiration date, I guess I'm fine with it.
  • The Helper The Helper:
    If you move a thread please leave a permanent redirect. You can delete any redirects after 6 months. The redirects are left to help Search Engines find the moved content.
  • tom_mai78101 tom_mai78101:
    What if you move the permanent redirect, not the thread?
  • The Helper The Helper:
    I think that works but I have not messed with it. You can delete redirects though if you have to that will not delete the original thread
  • The Helper The Helper:
    if a redirect ends up in the same forum as the post it goes to though I think the redirect drops or fails or something but they are not bugged out and when you are working on an indirect the original post is safe.
  • The Helper The Helper:
    Happy Early Friday :)
    +1
  • V-SNES V-SNES:
    Happy Friday :)
  • tom_mai78101 tom_mai78101:
    Fun Friday for me
  • tom_mai78101 tom_mai78101:
    Happy Fun Friday to all.
    +2
  • The Helper The Helper:
    Happy Sunday everyone!!!
  • V-SNES V-SNES:
    Happy Sunday!!!
    +1
  • jonas jonas:
    Happy monday :p
  • jonas jonas:
    Everyone hates mondays?
    +1
  • The Helper The Helper:
    Happy Tuesday!
  • jonas jonas:
    Happy belated tuesday
  • tom_mai78101 tom_mai78101:
    I found out you can't delete nor hide redirect links to existing threads. It will just stay there. I have no choice now but to start moving thread redirects to News Archive.
  • The Helper The Helper:
    That is not the way that it works for me I can delete redirects you just have to hit refresh sometimes big deletes will take a while as long as moves\
  • The Helper The Helper:
    You don't have to do that you can just leave stuff there in headline news for up to a year it was already down to like 8 months there is no rush.

    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