Is there something I can add to a sword or other weapon to make its projectile affect the player as well? For example, I made a sword spawn rungas and runstatusprojectile, but the player doesn't seem to be affected by it. "universalDamage" : true doesn't seem to do anything. Alternatively, I understand that statuses can be called during the windup and cooldown, etc, phases of a swing, but is there any way to prevent those form expiring immediately after the phase is over?
Not really sure this is right or not but I assume it has to do with "damage team" and "parentID" variables. The parentID of the projectile spawned by .sword or .gun file is automatically set as the owner of the weapon. It shares same damage team with its parent so it cannot damage its owner.
Not that I have been able to find. Im assuming you want to give the player a status effect while the player has out a specific weapon? I don't really know if that is possible. One thing you could TRY (And I dont know if it will work) is to add in the status effect JSON data that corresponds to the armor effects and see if it registers. I dont think the weapon class has those properties though but it is worth a shot.
I tried that once and it didn't work. As far as I know, I don't think it is possible to spawn projectile that affects the owner without using LUA.
I'm in nightly, so I DO have Lua access. All right. Think this might work? status on cooldown -> calls projectile with world.spawnProjectile -> That projectile calls the required status.
Hmm. Never tested in nightly build(since it always crashes in my computer somehow). But, if you can get access to LUA, I believe you can modify the damage team of spawned projectile and make it possible to affect the owner. And about the thing you asked that might work or not, I think you can implement it without using status effect if you're accessible to LUA.
Understood. For the moment, I'll see if my method works, since I'm a noob at modding and have no idea how Lua might be used to change its damage team on the fly, or how I might inject the script into the weapon.
Nope, it doesn't work. The status spawns the projectile just fine, but it keeps its damage team. Bah, will just have to think of another way.
The sad part is back in December you could have. They removed the feature where you can hurt your self.
I think they should re-implement that. I mean, really, it is kind of absurd that you can fire rocket launcher in zero-distance and take no damage at all.
You can try, add an statuseffect with direct damage, like burn. you can do that in a sword for example