Monk3h Posted April 27, 2008 Share Posted April 27, 2008 Right, i need help with a battle script for my game. Its not going too be too complicated i hope i just need a few ideas on where to start. Ofc if anyone has some spare time on there hands an wishes too help me further that would be great! Basicly im trying to make a battle script for Army vs Army kind of thing. Each each tribe can buy there own troops of diferent verietys and then send them at the other tribe to fight! Each unit type has there own HP and dmg points. but id like for some units to be more efective against certain types of units so people dont just buy loads of the 'best' unit type. I have a table for the troops and there is a row for each type of unit. The feilds in this table are. id, name, type, cost, desciprion, hp, dmg, fire. hp = health dmg = Damage fire = what place it fires in the battle. I need my script to select the first unit to fire by its 'fire' then have the dmg done reduce all the units its fireing ats 'hp' over an average. Then update how many units died (if a units hp reaches 0 it dies) then select the second unit to fire and do this over and over untill the last unit has fired. Not untill some one has lost all there units but untill 1 of each unit has had its turn. Any Advice/help? XD Quote Link to comment Share on other sites More sharing options...
Monk3h Posted April 27, 2008 Author Share Posted April 27, 2008 Any ideas on how i could make the dmg be done too all the troops equaly? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.