thechris Posted May 19, 2009 Share Posted May 19, 2009 Ok I'm switching the game I'm developing from XML files over to using an online database, but what I did in XML was time consuming to do so I was looking for an easier way while I make the transition. Anyway here is what I'm doing: its a fighting game so I have a table for the character, another table for the attacks each character can only use certain attacks and some attacks can be used by all the characters, so I was wondering what the easiest way would be to make it so that when I'm loading the characters it lists only the attacks that they can use. I thought about making a field in the characters table and then putting the ID of the attacks that they can use, or the opposite and putting a field in the attacks with the ID's of the characters that can use the attack. That was kind of confusing I apologize, but I can't really explain it any better. Quote Link to comment https://forums.phpfreaks.com/topic/158790-looking-for-easiest-way-to-acheive-this/ Share on other sites More sharing options...
fenway Posted May 19, 2009 Share Posted May 19, 2009 I thought about making a field in the characters table and then putting the ID of the attacks that they can use, or the opposite and putting a field in the attacks with the ID's of the characters that can use the attack. Make a third table linking the two... Quote Link to comment https://forums.phpfreaks.com/topic/158790-looking-for-easiest-way-to-acheive-this/#findComment-837498 Share on other sites More sharing options...
thechris Posted May 19, 2009 Author Share Posted May 19, 2009 I thought that was the way to go but I've never done something like that so how do I accomplish that task Quote Link to comment https://forums.phpfreaks.com/topic/158790-looking-for-easiest-way-to-acheive-this/#findComment-837506 Share on other sites More sharing options...
fenway Posted May 20, 2009 Share Posted May 20, 2009 I thought that was the way to go but I've never done something like that so how do I accomplish that task We have some pretty good tutorials around here, and in the stikcikes. Quote Link to comment https://forums.phpfreaks.com/topic/158790-looking-for-easiest-way-to-acheive-this/#findComment-838183 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.