Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (flink, AndrewAMD, TipmyPip, 1 invisible), 667 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
I have a question for comparisons #330937
07/01/10 02:03
07/01/10 02:03
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline OP
Member
paracharlie  Offline OP
Member
P

Joined: Mar 2009
Posts: 146
USA
I have a comparison for my game.
How would I add +1 for every 5 levels.
For instance:
if(SIZ_CON >= 36 && SIZ_CON <= 40){HIT_POINTS = 50;}
Now for every 5 levels above that add +1. I'm wracking my brain here. Can someone help?


A8 Commercial
Re: I have a question for comparisons [Re: paracharlie] #330948
07/01/10 06:13
07/01/10 06:13
Joined: Mar 2009
Posts: 88
Walori Offline
Junior Member
Walori  Offline
Junior Member

Joined: Mar 2009
Posts: 88
couldn't really tell what you wanted to add for one, but in case hit points try something like this:

Code:
var last_count = 0;
var next_count = 5;

while(1)
{
   if(last_count >= next_count)
   {
      HIT_POINTS +=1;
      next_count +=5;
   }
   else
   {
      last_count +=1;
   }
wait(1)
}



Re: I have a question for comparisons [Re: Walori] #330966
07/01/10 10:05
07/01/10 10:05
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
HIT_POINTS = 50 + integer(levels_above_that/5);

Re: I have a question for comparisons [Re: Lukas] #330991
07/01/10 13:59
07/01/10 13:59
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline OP
Member
paracharlie  Offline OP
Member
P

Joined: Mar 2009
Posts: 146
USA
Ok, sorry guys I wasnt clear, looking back at it now. I had to walk away from my ocde for the day lol...
SIZ (size)
CON (constitution)
SIZ_CON = SIZ + CON;
Total of SIZ_CON determines hit points.
50 hitpoints is alot in this game. SO basically, for every 5 points of SIZ_CON over total of 40 SIZ_CON is only +1 hit point.

Thanks Walori, I'm looking at a counter.

Last edited by paracharlie; 07/01/10 14:05.

A8 Commercial
Re: I have a question for comparisons [Re: paracharlie] #330993
07/01/10 14:06
07/01/10 14:06
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
if (SIZ_CON > 40 && !fraction(SIZ_CON / 5)
{
HIT_POINTS ++;
}

Re: I have a question for comparisons [Re: Widi] #330995
07/01/10 14:11
07/01/10 14:11
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline OP
Member
paracharlie  Offline OP
Member
P

Joined: Mar 2009
Posts: 146
USA
Thanks, going to try it.


A8 Commercial

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1