I have several weapons in my game, and I would like to attach them to any unit that picks them up. Problem is, I'm using units that do not all have the same attachment points. Can someone help me with this? For example I want to attach the weapon to unit X's "Weapon Right" but unit Y has a "Hand Right" instead, so "Weapon Right" does not work. I tried to do this in the Actor Events and got an error:
Attempting to host off (1a19 4) CActorModel which is already hosted off this (though not necessarily directly).
And I got a similar error when trying to do it in triggers.
Use a switch effect to validate the unit type of the caster/source, and then make a seperate launch missile effect and attack actor depending on your needs.
You can also make a custom attachment method actor that filters for "hand right" and uses "weapon right" as a fallback, if those are the only 2 attachments you want to be using.
I'm not trying to launch a missile, but just have a model addition to the unit, so when it is carrying an axe, you can see it in his right-or-left-or-whatever's-available hand, not sure if that changes things or not.
And what is the attachment method? Sorry, the attachment process is confusing to me.
You can creat Site Operation Attachment type actors, where you can reference to real attachment pont that are not weapon left or weapon right. For example lot of unit unit uses SOpAttachWeaponXX (x= number) for weapons. There is few Weapon attachment points that has 00 or other number at the end. You can creat custom one by copy or creat a new Site Operation Attachment actor and set it in attachment query methods field : filter type: direct: weapon, index: 00
that is the SOpAttachWeapon00 settings, but you can change it. If you use simply attach models as weapon, you can use SOpAttachWeaponLeft or SOpAttachWeaponRight. these are the basic, however you said and example that unit uses hand named attachment point. it is little bit longer job but can be done. Solution:
1 Copy SOpAttachWeaponLeft and SOpAttachWeaponRight
2 rename them to SOpAttachHandLeft and SOpAttachWeaponRight
3 open new tab (on the bar where unit, actors, weapons, behaviors etc found) editor actor data: attachment methods.
you can see here some filters including the original SOpAttachWeaponLeft and SOpAttachWeaponRight methods as filter weaponleft and filter weaponright.
4 copy filter weaponleft and filter weaponright
5 name them to filter handleft and filter handright
6 on left one set keys keyword: add value: hand, add value: left, on right one set keys keyword: add value: hand, add value: left
7 Switch back to actor tab.
8 on left weapon left set attachment query methods: filter type: methods: Filter handleft, on right weapon left set attachment query methods: filter type: methods: Filter handright.
9 Now you can use it in model attaching as the basic attachment points.
10 To solve that all units could use the same models as weapon, you can make the same amount of weapon model than attachmentpoints variation exist
Example: in my project there is dwarf warrior that uses 2 axe and a helmet(crown) and these are 3 different model addition models. and the basic unit (host)is Dwarf warrior. However you dont have to creat multiple model additions for all units because there is an option:
in host subject: switch from actor tag to alias tag and select '_unit'. and it will automaticly search for unit when it created. My warrior has event in the modell addition actors that is Unit.birth, but you would like to creat pick up weapons so I suggest that when unit pick up a weapon give him a behavior, and the model addittion actor creat when behavior on and destroy when behavior off.
Thank you! That helps a lot. So now I can create a different attachment method for each different type I'll need, is there a way to do it all in one model addition actor, or do I need to make one for each type? (For example Weapon Right, Hand Right, Weapon Left, Weapon)
your welcome, you can make the filters one by one but you can combine them in actor, and I think you can combine actors in actors too but before combining you must creat does that not exist. I suggest study the battlecruiser weapon and attachment points.
sorry for minor bump, but as i understand it i couldnt use this method to apply a psi blade to a ghost for example, because the ghosts model doesnt have the aniamtions for ipsiblade attacks , im trying to geti nto this whole sc2 editor, but so far it seems way easier just kitbashing a dark templer model to look like a terran
Based on what I've learned from working with the editor, much of its limitations lie in models and animation; to accomplish the effect described in your Ghost scenario, you're out of luck if you don't want to go into an external 3D modelling program such as Blender to add the animations yourself (unless you're really okay with the unused spell animations in the existing Ghost model).
yeah thought so, currently trying to kit bash a dark templar to look human, as a side project also trying to get the hang of nova covert ops addon as nova herself has the monocular blade animations. my skill with blender is super limited and im just finding my way as i go along.thanks for the info
Thats correct, the models limit you if you cant modeling, but ghost has a melee attack with lightsaber, there are two animation called spell, and spell cover (not spell A B C just spell), and when ghost use it a lightsaber,appears and ghost uses melee attack animation, the normal spell is animated with he has his basic rifle on the left hand and the saber is on right hand, the spell cover is the same but his gun is on his back, like he has when you put him on hold fire.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi everyone,
I have several weapons in my game, and I would like to attach them to any unit that picks them up. Problem is, I'm using units that do not all have the same attachment points. Can someone help me with this? For example I want to attach the weapon to unit X's "Weapon Right" but unit Y has a "Hand Right" instead, so "Weapon Right" does not work. I tried to do this in the Actor Events and got an error:
Attempting to host off (1a19 4) CActorModel which is already hosted off this (though not necessarily directly).
And I got a similar error when trying to do it in triggers.
Use a switch effect to validate the unit type of the caster/source, and then make a seperate launch missile effect and attack actor depending on your needs.
You can also make a custom attachment method actor that filters for "hand right" and uses "weapon right" as a fallback, if those are the only 2 attachments you want to be using.
I'm not trying to launch a missile, but just have a model addition to the unit, so when it is carrying an axe, you can see it in his right-or-left-or-whatever's-available hand, not sure if that changes things or not.
And what is the attachment method? Sorry, the attachment process is confusing to me.
@DaBernMon: Go
You can creat Site Operation Attachment type actors, where you can reference to real attachment pont that are not weapon left or weapon right. For example lot of unit unit uses SOpAttachWeaponXX (x= number) for weapons. There is few Weapon attachment points that has 00 or other number at the end. You can creat custom one by copy or creat a new Site Operation Attachment actor and set it in attachment query methods field : filter type: direct: weapon, index: 00 that is the SOpAttachWeapon00 settings, but you can change it. If you use simply attach models as weapon, you can use SOpAttachWeaponLeft or SOpAttachWeaponRight. these are the basic, however you said and example that unit uses hand named attachment point. it is little bit longer job but can be done. Solution:
1 Copy SOpAttachWeaponLeft and SOpAttachWeaponRight
2 rename them to SOpAttachHandLeft and SOpAttachWeaponRight
3 open new tab (on the bar where unit, actors, weapons, behaviors etc found) editor actor data: attachment methods.
you can see here some filters including the original SOpAttachWeaponLeft and SOpAttachWeaponRight methods as filter weaponleft and filter weaponright.
4 copy filter weaponleft and filter weaponright
5 name them to filter handleft and filter handright
6 on left one set keys keyword: add value: hand, add value: left, on right one set keys keyword: add value: hand, add value: left
7 Switch back to actor tab.
8 on left weapon left set attachment query methods: filter type: methods: Filter handleft, on right weapon left set attachment query methods: filter type: methods: Filter handright.
9 Now you can use it in model attaching as the basic attachment points.
10 To solve that all units could use the same models as weapon, you can make the same amount of weapon model than attachmentpoints variation exist Example: in my project there is dwarf warrior that uses 2 axe and a helmet(crown) and these are 3 different model addition models. and the basic unit (host)is Dwarf warrior. However you dont have to creat multiple model additions for all units because there is an option: in host subject: switch from actor tag to alias tag and select '_unit'. and it will automaticly search for unit when it created. My warrior has event in the modell addition actors that is Unit.birth, but you would like to creat pick up weapons so I suggest that when unit pick up a weapon give him a behavior, and the model addittion actor creat when behavior on and destroy when behavior off.
@ragadozo444: Go
Thank you! That helps a lot. So now I can create a different attachment method for each different type I'll need, is there a way to do it all in one model addition actor, or do I need to make one for each type? (For example Weapon Right, Hand Right, Weapon Left, Weapon)
@DaBernMon: Go
your welcome, you can make the filters one by one but you can combine them in actor, and I think you can combine actors in actors too but before combining you must creat does that not exist. I suggest study the battlecruiser weapon and attachment points.
sorry for minor bump, but as i understand it i couldnt use this method to apply a psi blade to a ghost for example, because the ghosts model doesnt have the aniamtions for ipsiblade attacks , im trying to geti nto this whole sc2 editor, but so far it seems way easier just kitbashing a dark templer model to look like a terran
@Hecks567: Go
Based on what I've learned from working with the editor, much of its limitations lie in models and animation; to accomplish the effect described in your Ghost scenario, you're out of luck if you don't want to go into an external 3D modelling program such as Blender to add the animations yourself (unless you're really okay with the unused spell animations in the existing Ghost model).
Custom Campaign Initiative | Mapster Community Project: Data Wizards
Starcraft II: Unsung Rebels, a custom campaign for Starcraft II
SC2Saver, a way to create saved games via trigger
Frustrated with the editor and would like answers in real time? Join the SC2Mapster Discord!
@aZergBaneling: Go
yeah thought so, currently trying to kit bash a dark templar to look human, as a side project also trying to get the hang of nova covert ops addon as nova herself has the monocular blade animations. my skill with blender is super limited and im just finding my way as i go along.thanks for the info
@Hecks567: Go
Thats correct, the models limit you if you cant modeling, but ghost has a melee attack with lightsaber, there are two animation called spell, and spell cover (not spell A B C just spell), and when ghost use it a lightsaber,appears and ghost uses melee attack animation, the normal spell is animated with he has his basic rifle on the left hand and the saber is on right hand, the spell cover is the same but his gun is on his back, like he has when you put him on hold fire.