Developer Store
Support
Member Forums

Screenshots
FAQ
Documentation
License
Known Issues
Downloads

MMOWorkshop BACK!

PyTorque
TGB Web Browser


jburch

hallsofvalhalla - Been A while
xapken - Wizards and Champions
J.C. Smith - The Repopulation - 0.5.2 Build Notes
EmpireGames - Elementals in Rise of Heroes
Empire Games - WarPath.
jaidurn - Warcall 0.0.1.0 build notes
medafor - Final detailing of models
Thamior - Presence system GONE! [May 25th 2009)]
... MORE BLOGS!

Building a MMO
Wow I had no idea....
Quest Remnants of Chaos
Checking to see if anyone is sti...
Well here I am again :)
T3D and MMOKit
afx 2.0
Terrain specularity [video]
Torque T3D MMO Kit
[3dFoin] Dragon Bug

This is the definition of the SimItem class used to hold information about the dropped item. I put that in simulation/simobject.py:

class SimItem(pb.Cacheable):
    def __init__(self, id, transform, name):
        self.observer = None
        self.id = id;
        self.transform = transform
        self.position = tuple(transform[:3])
        self.rotation = tuple(transform[3:])
        self.name = name;

    def getStateToCacheAndObserveFor(self,perspective,observer):
        self.observer = observer
        state = {}
        state['id'] = self.id
        state['position'] = self.position
        state['rotation'] = self.rotation
        state['name'] = self.name
        return state
    
    
    def stoppedObserving(self, perspective, observer):
        self.observer = None

class SimItemGhost(pb.RemoteCache):
    def __init__(self):
        self.position = "0 0 0"

    def setCopyableState(self, state):
        self.id = state['id']
        self.position = state['position']
        self.rotation = state['rotation']
        self.name = state['name']
    
    def observe_updatePosition(self,position,canKite):
        self.position = position
    
    def observe_updateTransform(self,position,rotation,waterCoverage):
        self.position = position
        self.rotation = rotation
    
pb.setUnjellyableForClass(SimItem, SimItemGhost)