Re: Best way to have virtual objects do something?
| From: | Leif K-Brooks | Date: | Fri, 19 Jul 2002 20:24:37 +0000 |
| Subject: | Re: Best way to have virtual objects do something? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-20665@lists.php.net to get a copy of this message | ||
Can someone please help me? I know I should figure it out myself, but
it's pretty urgent.
Leif K-Brooks wrote:
First of all, I'm sorry if the php general list would be a better place to do this. Anyway, I am making a game website with a friend. Among other things, it will have virtual objects that can be used to do things. My database structure idea is something like: item_actions(id int,displaycode text,code text) item_types(id int,actions text,name text) items(id int,type int,owner int) The action display code will control how the action text is displayed, it's code will be run when it gets used. The actions field in item_types will have the ids of what this type of item can do. The thing is, I want to be able to pass values to the actions so that I won't need to add a new action for every small difference. I have considered using funcctions for each action, but I want to store them in the database so artists can add items without knowing php. Any ideas? Thanks.