Let's say that I spawn a unit and attatch a gun to him with triggers that's easy.
But is there a way to attatch something else on this gun like new scope or ammo with triggers or the data editor and if so, how?
For each attachment, you need to create a new actor of type model (you probably want to inherit from ModelAddition):
Make sure that the hosting alias is set to an alias that your unit's main actor defines (usually _Unit or _Selectable). Set the hosting site operation to where you want the model attach SOpAttachTarget, etc. Tweak the rest of the model actor as you like
Finally, you need an event that creates the model appropriately. If it's specific to a given unit, it usually makes sense to have the model create its self when your unit births:
In the model actor's events
UnitBirth.<UnitName>
Create
If it's something you want to use on several units, have each unit create it. In the unit's primary actor:
ActorCreate
Create <NameOfModelActor>
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Let's say that I spawn a unit and attatch a gun to him with triggers that's easy. But is there a way to attatch something else on this gun like new scope or ammo with triggers or the data editor and if so, how?
@Wanzar: Go
For each attachment, you need to create a new actor of type model (you probably want to inherit from ModelAddition):
Make sure that the hosting alias is set to an alias that your unit's main actor defines (usually _Unit or _Selectable). Set the hosting site operation to where you want the model attach SOpAttachTarget, etc. Tweak the rest of the model actor as you like
Finally, you need an event that creates the model appropriately. If it's specific to a given unit, it usually makes sense to have the model create its self when your unit births:
In the model actor's events UnitBirth.<UnitName> Create
If it's something you want to use on several units, have each unit create it. In the unit's primary actor:
ActorCreate Create <NameOfModelActor>