Gamestudio Links
Zorro Links
Newest Posts
Bug in train mode, or it seem to me
by jcl. 09/22/26 14:47
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 09/22/26 12:21
Capital slider is not saving in Z12
by Petra. 09/22/26 06:49
Parent/child object
by VoroneTZ. 09/22/26 05:52
Zorro tutorial ideas?
by AndrewAMD. 09/21/26 14:50
Trades during a running bar
by Martin_HH. 09/21/26 12:03
Avoiding pop-up training parameter results
by Martin_HH. 09/16/26 21:31
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (VoroneTZ), 1,424 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Opus, Jubilee, lopezsergio07, mistery, lokkalyansamiti
19239 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 | 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