Game Development Community

IsServerObject() for scripts?

by Markus Nuebel · in Torque Game Engine · 02/13/2005 (2:35 am) · 2 replies

Is there a way, to detect in script code, if a method is executed server- or client-side?

Something like isServerObject() for C++ objects?

-- Markus

#1
02/13/2005 (3:07 am)
All code in the /server/ folder is executed on the server. All code in the /client/ folder is executed on the clients.

In general any game logic, ie stuff that isn't a gui or some method that interacts with a gui in some way, is a server script.
#2
02/13/2005 (10:45 am)
There is no general way to tell if code is run client or server-side, as there's no strong distinction between the two.