I have a custom behavior I add to units when they get hit by a custom ability of mine. I would like Units to display a model on them when they have a behavior on them.
Is it possible to create an actor that applys a model to a unit when a unit gets the behavior? How do I go about this?
Then What would be required to remove the added model when the unit loses the behavior?
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
Check the events of the actor model you want to attach.
Right click > Add Event.
MSg Type: Behaviour
Source name: (name of your behaviour)
sub name: on
¬ Create()
Add Event:
MSg Type: Behaviour
Source name: (name of your behaviour)
sub name: off
Destroy ()
Also be sure to check the models "host site operations" where you can choose where it attaches: eg: SOpAttachOrigin" (would be the base/origin of the unit)
Also you could add an event: ActorCreation and then choose wot animation to display etc, simularly you can do the same for ActorDestruction
Create Actor for behavior.( Im guessing there is a pre-defined behavoir type actor?)
Add Event MSg Type: Behaviour Source name: (name of your behaviour) sub name: on Create()
Add Event MSg Type: Behaviour Source name: (name of your behaviour) sub name: off Destroy()
Set desired Model for actor
Set Host Site Operations to specifiy where to attach the Actor
Here are my questions regarding this
Generally most actors have an ID they respond to that is set at one of the very top fields of the actor such as the marine actor has an UnitID that it looks for as "Marine" This is how it picks up on the unit and it knows it needs to show the actor. Will this actor work by only telling the events of this actor to moniter for the behavior?
Where in this does it know it is looking for a behavoir and how does it know it needs to attach it to a unit?
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
You said you want to apply a "model" to an unit when it gets a behaviour. I assume this model already has an actor as most do. You would simply select this actor and add this event in. The actor event is just that, it responds to events - so it know to check for this event. So when the behaviour is on - you tell the model to create and when off you tell it to disable.
Models do not have actors. Actors refrence models to display for the actor. Yes many actors are specifically designed to used the correct animations from a given model.
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
This is correct. Infact this is the actor that all 3 units; marauder, tauren and the marine itself uses. Each unit however has different sound actors for the sound effects for this behaviour;
So you would use the behaviour event to create the actor. Then use another event ActorCreation to choose what happens. In Stimpack it uses animation BSD so it does the birth anim stand and then death) You would need to modify the animation settings to just Birth and Stand and then the event ActorDestruction would play the death effect.
Bassically the stim pack has two actors it uses for the animations...
I was able to do it with 1 actor and add and removed based on the behavior being "created" or "destroyed" from a unit.
Now if i could only figure out where this red tint on the added actor is coming from.
Rollback Post to RevisionRollBack
Skype
KageNinpo = SN
My Libraries
DialogLeaderboard & TeamSort
My Projects
SPACEWAR Tribute
Infinite TD
I have a custom behavior I add to units when they get hit by a custom ability of mine. I would like Units to display a model on them when they have a behavior on them.
Is it possible to create an actor that applys a model to a unit when a unit gets the behavior? How do I go about this?
Then What would be required to remove the added model when the unit loses the behavior?
@SouLCarveRR: Go
Check the events of the actor model you want to attach.
Right click > Add Event.
MSg Type: Behaviour Source name: (name of your behaviour) sub name: on ¬ Create()
Add Event:
MSg Type: Behaviour Source name: (name of your behaviour) sub name: off Destroy ()
Also be sure to check the models "host site operations" where you can choose where it attaches: eg: SOpAttachOrigin" (would be the base/origin of the unit)
Also you could add an event: ActorCreation and then choose wot animation to display etc, simularly you can do the same for ActorDestruction
So let me get this straight.
Here are my questions regarding this
@SouLCarveRR: Go
You said you want to apply a "model" to an unit when it gets a behaviour. I assume this model already has an actor as most do. You would simply select this actor and add this event in. The actor event is just that, it responds to events - so it know to check for this event. So when the behaviour is on - you tell the model to create and when off you tell it to disable.
@Torrak: Go
Models do not have actors. Actors refrence models to display for the actor. Yes many actors are specifically designed to used the correct animations from a given model.
@SouLCarveRR: Go
Thats what i meant (but if you plan on using the model i assume youve alrdy got an actor for it) For more information check; StimpackStartImpact actor
Model actors do not have ID as you said previously. Instead the actor knows what to do from events. Eg: Effect, Behaviour etc)
@Torrak: Go
Alright well Ill see if i can replicate the basics of the stimpack actor.
From my understanding the stimpack actor can play on any unit in the game that actually uses the stim pack ability?
@SouLCarveRR: Go
This is correct. Infact this is the actor that all 3 units; marauder, tauren and the marine itself uses. Each unit however has different sound actors for the sound effects for this behaviour;
So you would use the behaviour event to create the actor. Then use another event ActorCreation to choose what happens. In Stimpack it uses animation BSD so it does the birth anim stand and then death) You would need to modify the animation settings to just Birth and Stand and then the event ActorDestruction would play the death effect.
@Torrak: Go
Ok got it to work
Bassically the stim pack has two actors it uses for the animations...
I was able to do it with 1 actor and add and removed based on the behavior being "created" or "destroyed" from a unit. Now if i could only figure out where this red tint on the added actor is coming from.
Create actor
Actor type:model
Based On: Model Addition
Non Doodad
Event
Actor Creation
-Animation Bracket Start, name=BSD, birth,stand, death, time = -1, type = automatic
ActorOrphan
-Destroy
Behavior."Behavior Name".On
-Create
Behavior."Behavior Name".Off
-Animation Bracket Stop BSD
Scroll down to Art- Model
Select what model you want on your effect.
Find
Hosting - Host Site Operations - Operations
Do SOpAttachCenter or SOpOverhead if you want it above the head
To set color, size, etc in events
ActorCreation
-set tint, or opacity, or size.