So, I've had an idea that boggled me for a very long time, but I was laying it off because I don't know a single flying thing about LUA scripting.

I know that melee weapons are more than possible(although in rather DayZ-ish manner that makes them tiny short-range shotguns), but what about them shooting multiple particles? So I've started to wonder about a kind of bastard child of sledgehammer and flamethrower - like those silly gunhammers you all probably heard about.

This kind of idea is actually a lot harder to do than it might at first seem. The basic idea is simply: a melee weapon with a flamethrower effect with a charging lua script, no problems there (most melee weapons already use multiple particles, you just don't see them), but the animations are close to impossible. The problem is that, first of all, you can't change the sprite of the gun easily (allthough there are workarounds for that) and secondly there is no (good) way to change hand placement or to easily manipulate arm rotation.

Sat Jan 10, 2015 4:26 pm

MaximumPingas

Joined: Mon Jan 05, 2015 7:00 pmPosts: 3

Re: Melee flamethrower weapon request.

clunatic wrote:

This kind of idea is actually a lot harder to do than it might at first seem. The basic idea is simply: a melee weapon with a flamethrower effect with a charging lua script, no problems there (most melee weapons already use multiple particles, you just don't see them), but the animations are close to impossible. The problem is that, first of all, you can't change the sprite of the gun easily (allthough there are workarounds for that) and secondly there is no (good) way to change hand placement or to easily manipulate arm rotation.

I do realize, however as far as I remember the WH40K compilation has moving weapons - chainswords, to be precise. So probably it's more possible that it looks like?

Moving as in rotating though, he means about moving the whole arm in a swing-like fashion, not just rotating the weapon. Rotating the arm to match the movement of the weapon is complicated, I guess there'd be conflicts between what the Lua script tells the arm to do, and what the engine tells it to do (follow the mouse/gamepad).

Of course, one could always try more obscure and unorthodox ways to do it, but I don't think it'd be worth the hassle.

Now, if I remember well, the most "real" melee weapons out there were from numgun's mods. Mercenaries had a sword that constantly emitted particles that had the same speed as the blade, so in order to do damage, you actually had to swing the sword (or jetpack-crash your enemies). AAL had a similar blade, the difference was that you had to click to activate it and then swing it around.

If you don't mind about having to use simple animations (like only rotating the weapon or having to swing the weapon around) your idea isn't hard to do.

If nothing else you could do this in a somewhat satisfactory manner using only .ini code files. The only downside to this method would be the actual "swinging" animation. Unless you intend for the player to manually swing the hammer then you could do something to that effect.

My recommendation would be to create an HDFirearm using the hammer sprite. Have the hammer have a "spinup" time (like the coalition gatling gun) and set the ammunition to 1. After holding down the fire button the hammer would release an AEmitter which would emit fire particles and perhaps some Air Blast particles to simulate knockback. You could also have some modified air blast emitting AEmitters attached to the edges of the hammer which would theoretically knock enemies back.

Optional Polish:- Use a very simple lua script to delay firing until you let go of the fire button- Use a slightly more complicated lua script to add extra particles the longer you charge

Probably the Most "True to Life" Solution:Create an HDFirearm that will act as the hammer, this hammer when fired should "Swing" the hammer with sprite animations.Create all other effects and particles.Add an AEmitter to the front end of the hammer (where it would be at the END of the swing animation) which will emit the fire (in the correct direction)Create a Lua script which would allow the hammer to be charged, after releasing the fire button the hammer should make the swing animation and the AEmitter should simulatneously release the appropriate amount of fire at the last frame of the swing animation. The script should then reset the sprite to frame 0.If desired you can have the hammer also emit some smoke or whatnot from the 'muzzle'. Or have the muzzle flash have a "swipe" sprite.

Finally, the reason you would not have the HDFirearm fire the fire is because of the way angles work in CC. Because we are using a manual sprite animation then the fire will not exit the gun at the correct angle. Unless you have the HDFirearm fire an Emitter which would then emit the fire in the appropriate direction.

Sun Jan 11, 2015 12:24 am

clunatic

Joined: Fri Nov 23, 2012 5:42 amPosts: 143

Re: Melee flamethrower weapon request.

MaximumPingas wrote:

I do realize, however as far as I remember the WH40K compilation has moving weapons - chainswords, to be precise. So probably it's more possible that it looks like?

Arcalane's WH40K mod doesn't have any kind of animated melee weapons, I never got around to trying DudeAbides' 40K mod, was it that one?

dragonxp wrote:

If nothing else you could do this in a somewhat satisfactory manner using only .ini code files. The only downside to this method would be the actual "swinging" animation. Unless you intend for the player to manually swing the hammer then you could do something to that effect.

My recommendation would be to create an HDFirearm using the hammer sprite. Have the hammer have a "spinup" time (like the coalition gatling gun) and set the ammunition to 1. After holding down the fire button the hammer would release an AEmitter which would emit fire particles and perhaps some Air Blast particles to simulate knockback. You could also have some modified air blast emitting AEmitters attached to the edges of the hammer which would theoretically knock enemies back.

Optional Polish:- Use a very simple lua script to delay firing until you let go of the fire button- Use a slightly more complicated lua script to add extra particles the longer you charge

Probably the Most "True to Life" Solution:Create an HDFirearm that will act as the hammer, this hammer when fired should "Swing" the hammer with sprite animations.Create all other effects and particles.Add an AEmitter to the front end of the hammer (where it would be at the END of the swing animation) which will emit the fire (in the correct direction)Create a Lua script which would allow the hammer to be charged, after releasing the fire button the hammer should make the swing animation and the AEmitter should simulatneously release the appropriate amount of fire at the last frame of the swing animation. The script should then reset the sprite to frame 0.If desired you can have the hammer also emit some smoke or whatnot from the 'muzzle'. Or have the muzzle flash have a "swipe" sprite.

Finally, the reason you would not have the HDFirearm fire the fire is because of the way angles work in CC. Because we are using a manual sprite animation then the fire will not exit the gun at the correct angle. Unless you have the HDFirearm fire an Emitter which would then emit the fire in the appropriate direction.

Don't forget that you can't acces an HDFirearm's sprite frame with lua, you can only use an ini SpriteAnimMode or use a workaround by animating an attachable. More importantly than that though: I've never been able to get a simple animated melee weapon to look anything close to good. Not having the arms move with the weapon just make it look very funky, as if the weapon is moving all by it self without the user doing anything. I'd love to be proven wrong though, if anyone knows a mod that's done it.

In the original plan it would be using spriteanimmode. Of course as you stated we need an attachable for the second option.

Sun Jan 11, 2015 3:34 am

Arcalane

Joined: Sun Jan 28, 2007 10:32 pmPosts: 1608Location: UK

Re: Melee flamethrower weapon request.

clunatic wrote:

MaximumPingas wrote:

I do realize, however as far as I remember the WH40K compilation has moving weapons - chainswords, to be precise. So probably it's more possible that it looks like?

Arcalane's WH40K mod doesn't have any kind of animated melee weapons, I never got around to trying DudeAbides' 40K mod, was it that one?

They're animated, but they're not truly animated. The weapon merely blinks out for a second (blank frame) and uses a 'swoosh' effect for the muzzleflash. It's not like animated arm swinging or anything.

Sun Jan 11, 2015 8:20 am

RandomCoderZ

Joined: Fri Sep 13, 2013 1:39 amPosts: 157Location: ᴱᵛᵉʳʸʷʰᵉʳᵉ

Re: Melee flamethrower weapon request.

So yeah I've been looking on this post for a while and for a while ago i just finished something that maybe can satisfy you, its not any Lua though.I'm no Lua programmer so dont expect anything big.

Who is online

Users browsing this forum: No registered users

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum