Metlx Posted November 1, 2009 Share Posted November 1, 2009 Heya, I need help with a game im making.. I have 3 types of soldiers. Let's call them A, B and C. Each type has different attack force. type A has 5 Attack force (points) type B has 10 Attack force type C has 15 Attack force Now let's say in a successful attack on enemy you lose 1% of your units (if 1% is less than 1 unit then you lose 0 soldiers). So when you attack (and succeed, you lose 1% of type A, 1% B, 1% C).. can someone please show me how to write that in php? Link to comment https://forums.phpfreaks.com/topic/179877-attack-php-game/ Share on other sites More sharing options...
Gayner Posted November 1, 2009 Share Posted November 1, 2009 Were not here to create a PHP Game for ya! Link to comment https://forums.phpfreaks.com/topic/179877-attack-php-game/#findComment-948904 Share on other sites More sharing options...
Metlx Posted November 1, 2009 Author Share Posted November 1, 2009 yeh i realize that. i just need a hint or 2 to get me going, if possible. Link to comment https://forums.phpfreaks.com/topic/179877-attack-php-game/#findComment-948906 Share on other sites More sharing options...
redarrow Posted November 1, 2009 Share Posted November 1, 2009 how many points to 1 unit first? Link to comment https://forums.phpfreaks.com/topic/179877-attack-php-game/#findComment-948908 Share on other sites More sharing options...
Metlx Posted November 1, 2009 Author Share Posted November 1, 2009 Each unit has as many health/defense points as they have attack points. ie. type A has 5 attack points, therefore 5 health/defense points. If A attacks A, it's 5 attack points vs 5 defense points -> failed attack. Link to comment https://forums.phpfreaks.com/topic/179877-attack-php-game/#findComment-948916 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.