View unanswered posts | View active topics It is currently Thu Apr 18, 2024 8:33 pm



Reply to topic  [ 8 posts ] 
 Next Shot Progress Bar 
Author Message
User avatar

Joined: Sun May 24, 2009 9:51 pm
Posts: 35
Reply with quote
Post Next Shot Progress Bar
Sorry for the title. I couldn't think of a better way to describe this.

Anyway, I thought that with Lua this might be possible to do. Could you maybe draw some sort of progress bar on your gun (or beside it or whatever) that would tell you when the next shot is ready? It gets kind of annoying when you have a sniper rifle or something with a similarly low fire rate and you don't know when you can shoot again so you're jamming on the fire button so it'll shoot the moment it's ready.

But then again, maybe only I do that.

Either way, I think it's a useful idea. But is it possible?


Sat May 30, 2009 7:05 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Next Shot Progress Bar
No drawing functions.

You could do it in an incredibly hacky way by spawning a series of MOSParticles that don't hit anything above your actor, but, again, that's incredibly hacky. You'd have to be manually setting the position of each.

Also, you can't acess reload time on a held weapon.


Sat May 30, 2009 7:32 pm
Profile
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Re: Next Shot Progress Bar
Darlos did it by spawning a MOSRot with a bunch of frames and switching between them when needed. (Or, at least that's what I think he did...)


Sat May 30, 2009 7:35 pm
Profile WWW
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Next Shot Progress Bar
You could do it hackily by having the gun floating and unable to pick up, merely updating with the actor's position if it is picked up... and having it manually point at aimaingle... and manually fire when you press fire... yeah, not the best solution.


Sun May 31, 2009 2:45 am
Profile WWW
User avatar

Joined: Fri May 11, 2007 4:30 pm
Posts: 1040
Location: England
Reply with quote
Post Re: Next Shot Progress Bar
for the last round in the mag make it emit a particle with a special name, when Lua detects the special particle start a timer, when the timer is the same time as the reload time - 50 (-50 so that by the time you react it will have reloaded) spawn a tiny green glow above the gun (a normal mopixel with a short lifetime)


Sun May 31, 2009 2:53 am
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Next Shot Progress Bar
That's only work with magazine reload time, he wants refire rate.


Sun May 31, 2009 3:15 am
Profile WWW
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post Re: Next Shot Progress Bar
Grif wrote:
No drawing functions.

You could do it in an incredibly hacky way by spawning a series of MOSParticles that don't hit anything above your actor, but, again, that's incredibly hacky. You'd have to be manually setting the position of each.

Also, you can't acess reload time on a held weapon.

Hackery is the bread and butter of all programming, friend. You say it like its a bad thing.

Though this IS pretty screwed up by the fact that you can't access held weapons. I could probably devise some way around that if I really tried though. It's amazing how effectively you can make your own pseudo-attachments with the functions available to us. I've been making all sorts of crap, like flames for setting actors on fire, or ice chunks that weigh actors down.


Sun May 31, 2009 7:38 am
Profile YIM
User avatar

Joined: Fri May 11, 2007 4:30 pm
Posts: 1040
Location: England
Reply with quote
Post Re: Next Shot Progress Bar
411570N3 wrote:
That's only work with magazine reload time, he wants refire rate.


use the time in-between shots then, and make it look for the particle name of the normal rounds. (when I say this I mean take the value from the ini file and paste that in your lua file as the value for "timebetweenshots" or something).


Sun May 31, 2009 2:52 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 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.147s | 15 Queries | GZIP : Off ]