PDA

View Full Version : Need idea for fridge


Larry123
26/10/2012, 10:16 AM
Hello,

I am planning to do fridge for house. Stats are from mysql. I want that the "fridge" is useable only near to fridge in the house interior. So which is better way to do?

I make new table to mysql and write these stats:


ID
PosX
PosY
PosZ
Pizza
Hotdog
Vodka
Beer
etc.


OR it is better to add these stats to my table which is made for house:


House stats here..
FridgeX
FridgeY
FridgeZ
Pizza,
Vodka,
Beer
etc.


I hope you understood. So the question is, is better to make new table or add fridge stats to table which is made for house?

Calabresi
26/10/2012, 10:26 AM
Adding fridge stats to table which made for house sounds better, because you'll need each object's coordinates in the way you doing it.

Larry123
26/10/2012, 10:28 AM
Mm oke, and then i just add Fridge position and stuff into house table and is it the best solution for fridge? :P

Calabresi
26/10/2012, 10:30 AM
Yeah, because you'll need IsPlayerInRangeOfPoint code to check if player is near fridge.