#applying Weapon primary attack as secondary on different ones
1 messages · Page 1 of 1 (latest)
nobody?
What is your intention with this ability anyway? What exactly should it represent or do?
in my mod (RWM) I added the spear's rocket spear ability to a floran lightsaber - i did this by copying the original weaponability + it's associated lua and created a renamed variant of the ability
I then had to edit the lua to make it accept non-spear weapons .
So yeah, it's possible, but requires a bit of working with lua
depending on the ability you should also be able to retrieve the frames from the weaponability
the important part is that you get the elemental type right for the weaponability - this is part of the code for my lightsaber's alt ability
"name" : "Rocket Spear ",
"type" : "rocketspearalt",
"scripts" : ["/items/active/weapons/melee/abilities/spear/rocketspearalt/rocketspearalt.lua"],
"class" : "RocketSpearAlt",```
notice that "type" and "scripts" point to my own weaponability file and lua and NOT the game's default weapon ability files
and for most altabilities your elementalType is going to be a non-physical one, such as "elementalType" : "poison", - but not all
some are physical
takes some figurng out to see which are physical and not, but generally elemental type attacks have 4 different frames - one for each elemental type
so i picked this up again.... which functions did you needed to change on the lua so it accepts other weapons?
the thing is, i also need to access a second png file for the animation
i will have a look - it has been a while
I'm not sure if creating a new lua script/weaponability is actually necessary now that I am looking into it - that is just what I did
at least - i can't seem to find where the ability is restricted to a type in the luas/weaponability files or weaponability config
so maybe it isn't
i would try simply including the wanted weaponability name in the altabilitytype and see if that works first