Raised This Month: $ Target: $400
 0% 

Required_kills_for_next_level


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 06-08-2010 , 14:39   Re: Required_kills_for_next_level
Reply With Quote #1

Code:
new const g_iRequiredKillsPerLevel[ ] = {     16,     32,     64,     128,     256 }; new g_iLevel[ 33 ], g_iKills[ 33 ], g_iRequiredKills[ 33 ]; g_iKills[ id ] = 37; while( g_iKills[ id ] >= g_iRequiredKillsPerLevel[ g_iLevel[ id ] ] ) {     g_iLevel[ id ]++; } g_iRequiredKills[ id ] = g_iRequiredKillsPerLevel[ g_iLevel[ id ] + 1 ] - g_iKills[ id ]; // this would make the level increase, as 37 is higher than the first two values in the global variable g_iRequiredKillsPerLevel, and therefore making g_iLevel variable increase in the while() loop // g_iRequiredKills holds the value that needs to be exceeded to gain another level
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode