Data Realms Fan Forums
http://45.55.195.193/

Next Shot Progress Bar
http://45.55.195.193/viewtopic.php?f=73&t=15076
Page 1 of 1

Author:  SgtBaboon [ Sat May 30, 2009 7:05 pm ]
Post subject:  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?

Author:  Grif [ Sat May 30, 2009 7:32 pm ]
Post subject:  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.

Author:  Roon3 [ Sat May 30, 2009 7:35 pm ]
Post subject:  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...)

Author:  411570N3 [ Sun May 31, 2009 2:45 am ]
Post subject:  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.

Author:  robolee [ Sun May 31, 2009 2:53 am ]
Post subject:  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)

Author:  411570N3 [ Sun May 31, 2009 3:15 am ]
Post subject:  Re: Next Shot Progress Bar

That's only work with magazine reload time, he wants refire rate.

Author:  Darlos9D [ Sun May 31, 2009 7:38 am ]
Post subject:  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.

Author:  robolee [ Sun May 31, 2009 2:52 pm ]
Post subject:  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).

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/