View unanswered posts | View active topics It is currently Mon Jan 06, 2025 11:17 pm



Reply to topic  [ 9 posts ] 
 I need help with something - Moving guns 
Author Message
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post I need help with something - Moving guns
I need to know how to do something, it stands to reason that it would work, but anyway...

Guns and diggers, Is it possible for them to move, while equipped?

for example, you fire a shotgun, it has kick-back, and the gun moves, but thats just the force in the gun. What I want to know is, is it possible for it to also rotate when fired, or even move to a different position.


For example, A Knife.

If I made a knife handle, Hitsmos = 0, with an attachable MOSRotating, Hitmos = 1,
infinite ammo like the shovel, when you fire, it creates NOTHING. no bullets, no new particles,
but instead, the knife MOVES FORWARD, a upwards thrust, or a forward stab, whatever.

I was about to make some mideval weapons, such as Spear, Bow, and Javelin.


I got stuck because I wanted to start with the spear. I was going to make it thrust forward, with a heavy, sharp attachable on the front, HitsMos = 1, and when I 'shoot" it just thrusts in that direction, hitting whatever is right in front, for MASSIVE DAMAGE. Unfortnately, I dont know how to do this.


I was also considering making it a multi-frame sprite, but I dont know how that works. especially for multi-frame sprites, with attachables, that change where they are per frame.


TL:DR I am stuck and need help with moving things and offsets and crap




So could someone who knows intimately how multi-frame weapons, and offsets work?


Sat Nov 08, 2008 4:08 pm
Profile YIM WWW
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: I need help with something - Moving guns
you cant make something move when fired, unless that was added this build.
how everyone else does it is give the weapon a flash that looks like movement, and make it shoot some damaging particles with low lifetime.
lua, make knife [or so they say], but as we have no knife lua as of yet, and could only use it in one scene if we did, just do what everyone else does.
furthermore, try attaching a sharp attachable to a gun then running at someone. doesnt work. i dont think animated weapon sprites would do this either, unless you wanted to use that instead of the flash.


Sat Nov 08, 2008 4:34 pm
Profile WWW
User avatar

Joined: Fri Mar 02, 2007 6:59 am
Posts: 1726
Location: NSW, Australia
Reply with quote
Post Re: I need help with something - Moving guns
Actually, you CAN make it so when you fire, the knife goes forwards, using the weapon sprites.
for example

knife000
knife001

where knife 000 is idle and 001 is thrusted forward.

Won't hurt people though, you'll need to either make it shoot invisible particles or attach an emitter. y'know, the usual tricks.

Good luck!


Sat Nov 08, 2008 9:37 pm
Profile
User avatar

Joined: Sun Dec 09, 2007 3:08 pm
Posts: 481
Location: Islamic Republic of Bradistan, Yorkshire, England
Reply with quote
Post Re: I need help with something - Moving guns
Yeah, I was thinking the same thing, but the second frame of a weapon doesn't show for very long, it's barely noticable. Data should really allow multiple frames for a weapon firing. That way, things could be animated nicely, like slides and bolts moving. Yes. But I'm pretty sure there's a good reason it's not in at the moment.


Sun Nov 09, 2008 1:08 pm
Profile
User avatar

Joined: Sun Dec 09, 2007 3:08 pm
Posts: 481
Location: Islamic Republic of Bradistan, Yorkshire, England
Reply with quote
Post Re: I need help with something - Moving guns
I noticed that the autocannon has two additional frames instead of just the one, but I tried making a big giant sprite with loads of frames that would be easily visible but it didn't work, I don't think it even plays two frames anymore.

Bollocks, double post.


Sun Nov 09, 2008 5:22 pm
Profile

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post Re: I need help with something - Moving guns
There is some kind of "WhileFiringHoldItLikeThis" offset.

But I made an invisible weapon a long time ago that made it's host its arm to look like it was punching.

Haven't tried making a spear thing, but it looks to me your clones need longer arms.


Sun Nov 09, 2008 5:50 pm
Profile WWW
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: I need help with something - Moving guns
Well, I'm scrapping the spear.

I tried the javelin idea I had, and it didn't exactly work. i'd need a sharp MOSR, which doesn't work. I might try one more time by giving it 2 emiters (one in front to do damage, one in back to cancel out that the front will push it backwards) but thats a huge maybe.

I will be doing a bow and arrow, crossbow, repeating crossbow, and the crossbow from halflife 2.

I have working code for the last 2, that need minor tweaking, and new sprites (currently, the 'testrod' in base.rte, with a flack cannon sprite)

also, I may update my pirates. pre-existing zombies make for an easy conversion, but theres something wrong with my pirates, falling more than 2 inches gibs them, and a single pistol shot to the head or stray gib, kills them. did they change how the materials work? everything's been going all wonkey.

anyway, I'll try to see if I can get someone here in my appartment to make the sprites, in the next day or 2, since I suck at spriteing, and if i cant get them, i'll start a request thread.

I might also soon update my pirates.




anyway, If anyone knows why my copy of the B21 skeleton insta-gibs on the drop of a hat in B22, please enlighten me.


Sun Nov 09, 2008 6:06 pm
Profile YIM WWW
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: I need help with something - Moving guns
zalo wrote:
There is some kind of "WhileFiringHoldItLikeThis" offset.


Really? Is it new to B22? Forgotten from an old build and still functional?
Please do mention an example of something that uses it.

Unless you mean SharpStanceOffset.


Mon Nov 10, 2008 6:28 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: I need help with something - Moving guns
if he meant sharpstanceoffset that description wouldnt fit. enlighten us!


Mon Nov 10, 2008 6:36 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 9 posts ] 

Who is online

Users browsing this forum: No registered users


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.053s | 13 Queries | GZIP : Off ]