Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Rounds Per Minute; Using global.time_factor
Topic Started: Dec 4 2007, 08:05 AM (794 Views)
Linkin
Member Avatar
Forum God
[ *  *  *  *  *  * ]
How could i calculate the rounds per minute from my weapon using global.time_factor?
Posted Image
Want something done in Photoshop, make a request Here

Formerly known as DS-Development.
Offline Profile Quote Post Goto Top
 
harkathmaker
Member Avatar
Persistent Enquirer
[ *  *  *  *  * ]
What specifically is global.time_factor? Time between each shot, or the variable you want set to RPM?
Offline Profile Quote Post Goto Top
 
Linkin
Member Avatar
Forum God
[ *  *  *  *  *  * ]
global.time_factor=100/max(20,fps);

global.time_factor is a variable made by Dr.Best for keeping things independent from the framerate, I need this solved because i want to be able to alter weapon stats ingame and test the Rounds fired per minute. But i don't want the fps to be a problem.
Posted Image
Want something done in Photoshop, make a request Here

Formerly known as DS-Development.
Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
1000 milliseconds in a second?

60000 in a min.

if (abs(current_time - old_time ) > 60000)
{
rpm = temporary_count;
temporary_count = 0;
old_time = current_time;
}
Blog|EHS
Offline Profile Quote Post Goto Top
 
Linkin
Member Avatar
Forum God
[ *  *  *  *  *  * ]
Err sorry how do i use that?
What part in that changes the rpm?
Posted Image
Want something done in Photoshop, make a request Here

Formerly known as DS-Development.
Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
Code:
 

if (abs(current_time - old_time ) > 60000)

Checks if it has been a minute.
Code:
 

rpm = temporary_count;

Sets the variable 'rpm' to a variable you have to set yourself, called 'temporary_count' and should be used like this:
Code:
 

fire_weapon();
temporary_count += 1;


You can edit it, maybe like this:
Code:
 

rpm = temporary_count+rpm;
rpm *= 0.5;
Blog|EHS
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
Or you could just load up nifty ol "ms calculator" and use some classic "dimensional analysis" to solve for the elusive rpm.
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
Dimensional Analysis sucks. Last year, in Algebra 2, the quiz for that was the only thing I didn't get a 100% on.

Anyways, there's only one linear equation, so there's no way you can use dimensional analysis. Unless there's some whole piece of it I never learned in class.
Blog|EHS
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply