inherit
Banned
39031
0
May 31, 2007 9:56:53 GMT -8
ryndell
1,808
March 2005
ryndell
|
Post by ryndell on Sept 2, 2005 16:04:03 GMT -8
Okay I am understanding how php works, but i do have a question about something i dont know yet. Here is my question :
How would i work into php a specific stat say strength. to add 1 point to say attack, per every 4 points of strength. I mean how would i connect the two stats working together. So for ever 4 points of strength. the attack points would go up?
|
|
inherit
Proboards Legend
212
0
May 11, 2006 12:32:55 GMT -8
california
21,035
December 1999
california
|
Post by california on Sept 2, 2005 16:39:35 GMT -8
Well assuming you want only integers and not floating points, you'll want to have something like this:
$attack = (int)floor($strength / 4);
|
|
inherit
Banned
39031
0
May 31, 2007 9:56:53 GMT -8
ryndell
1,808
March 2005
ryndell
|
Post by ryndell on Sept 2, 2005 16:50:16 GMT -8
Thank you California i didnt think it would be something that simple to add. I mean i can code out 98 percent of the code myself. There might just be two to 3 specific questions i might have now and then .
I found a great online free full php book, that helped alot in understand it.
|
|