Should objects and traps know where they are?
Posted: Wed Dec 01, 2010 5:32 am
A bit of background... in VR there are people hiding behind locked doors (what would you do if zombies started appearing?) and to handle this I have placed a "x" on doors that you hear noises behind. The "x" is actually an object that has a can_talk variable set, so bumping into it will initiate a chat. Now say you convince the NPC to open the door within the chat... well the object currently doesn't store its x and y position... problem.
I suggest engine.Zone:addEntity add the position to objects and traps as well as actors and projectiles. The terrain should be left untouched since a single copy is used for all of the similar type, but I think all objects and traps are different copies and thus can store their position just fine. So... any reason not to?
I suggest engine.Zone:addEntity add the position to objects and traps as well as actors and projectiles. The terrain should be left untouched since a single copy is used for all of the similar type, but I think all objects and traps are different copies and thus can store their position just fine. So... any reason not to?