How do I attach weapon effects for abilities?

Hi everyone,

I'm trying to create an ability for a special kind of weapon. Its all working fine so far. The only problem I'm having, I can't get the ability to fire the attached weapon effect from two hardpoints on the model at once.

This is the relevant text from the ability.entity:

weaponEffectOriginType "Targetter"
weaponEffectAttachInfo
    attachType "Ability"
    abilityIndex 0

The weapon effect is described under weaponEffectsDef and it plays fine, with the limitation of the hardpoint problem.

On the mesh, I have defined two hardpoints as Ability-0. But that does not make the weapon fire from more than one point on the model in game.

Am I making a mistake or is the game currently not capable of making an ability fire from two hardpoints at once?

Thanks in advance for any help with this!

6,105 views 5 replies
Reply #1 Top

I have managed to do this now, by placing the weapon effect into the buff.entity and making two instant actions, one for each ability hardpoint.

The thing I need to know now is how to make two projectile hardpoints focus fire? At the moment I have to projectile streams that fire at the same time but each target a random point on the mesh of the enemy ship. It would be nice if the two projectile streams would shoot at the centre of the target.

Reply #2 Top

Why don't you name the hardpoints the same thing and then attach a weapon effect to both of them with just one buff.

Change the attachType to "Ability-0" instead of "Ability"

 

Look at the Marza for an example of multi-hardpoint effect launching.

Reply #3 Top

I'm affraid that doesn't work Krdax. That was one of the first things I tried but the only valid entry for attachType is Ability, Aura, Center etc. You use the ability index to say witch one. But if there are several with the same number it will only use one of them.

Reply #4 Top

I don't know if that's possible. You may need to turn the two barrels into 1 ability with the meshpoint in the middle and make a V shaped custom effect with the points of the V spread the same distance as the barrels.

A very interesting idea, I will follow.

EDIT:

Quoting Jefferies, reply 1
The thing I need to know now is how to make two projectile hardpoints focus fire? At the moment I have to projectile streams that fire at the same time but each target a random point on the mesh of the enemy ship. It would be nice if the two projectile streams would shoot at the centre of the target.
End of Jefferies's quote

Try Changing 

weaponEffectImpactOffsetType "RandomMesh"

to

weaponEffectImpactOffsetType "Center"

there is also

weaponEffectImpactOffsetType "CenterOffsetBySpatialRadius"

Reply #5 Top

Thanks myfist0, thats exactly what I ended up doing.

These three lines will make multiple effects focus fire on the centre of a target.

    weaponEffectImpactOffsetType "Center"
    canWeaponEffectHitHull FALSE
    canWeaponEffectHitShields FALSE

Coupled with a nice explosion at the end of the effect it really looks quite neat!