Jump to content

Papyrus Script, giving a melee weapon the projectile properties of the Tesla Rifle


WJS97

Recommended Posts

Hi, I'm creating a Classic Super Sledge and need some scripting help for one of the modifications.

 

It's a shock based mod and if possible I'd like it to behave in a similar way to the Automatron Tesla Rifle, in the sense that when an enemy is struck; it will damage them as well as any other nearby hostile NPCs, with an arc of electricity jumping between them.

 

It's really simple to make a firearm work this way because I can just override the projectile to use "DLC01LightningGunProjectile". But melee weapons don't have projectiles so a more complex solution is needed.

 

One user has suggested creating a script that registers on the "WeaponSwing" animation event and uses the "fire()" function to shoot a projectile, but I don't have the scripting knowledge to make this happen.

 

I've put a lot of effort into making this and I'd feel like having it just deal shock damage would be a pretty big let down compared to something like what I've proposed above.

 

If any talented scripters can provide me with help on this I would be immensely grateful and I'll give you due credit when the mod is released.

 

Thanks!

 

http://i.cubeupload.com/aNpBEd.png

Edited by WJS97
Link to comment
Share on other sites

There are a couple of other ways to go about this, such as taking notes from the Shishkebab and making it a critical effect, or alternatively making it an old-fashioned enchantment effect with the enchantment holding the bulk of the scripting.

Link to comment
Share on other sites

I would use

Event OnHit(ObjectReference akTarget, ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, \
  bool abSneakAttack, bool abBashAttack, bool abHitBlocked, string apMaterial)

instead of a swing animation using Fire() since it's a melee weapon that doesnt normally have a projectile. I'm not very good with suckrus, or more like I think it's s#*! and hate it, so can't really give you more then that.

Link to comment
Share on other sites

 

I'll take a look at how the projectile works then make a magic effect for it. That can be applied to an enchantment (for always cast) or a spell (for a crit effect).

 

Thanks! I'm ready to test as soon as you have something

 

 

My current implementation plan is to attach the DLC01LightningGunHazardExplosion to an Enchantment via a MagicEffect, and then work on fleshing out any further effects as needed.

 

Of course this will cause the mod to rely in automatron, but unless you can create asset replacement for the explosion then it'll have to for now.

Link to comment
Share on other sites

0d8772M.jpg

Well, effect's working, but the range is so bad is may as well not be there. Gonna work on doing some tweaking to make it more effective at chaining. Currently using Shiskebab as a placeholder since its weapon's design architecture is similar to what you're trying to achieve from what I can tell.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...