-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathobjectiveModule.tscript
More file actions
62 lines (54 loc) · 1.94 KB
/
objectiveModule.tscript
File metadata and controls
62 lines (54 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
function ObjectiveModule::onCreate(%this)
{
}
function ObjectiveModule::onDestroy(%this)
{
}
//This is called when the server is initially set up by the game application
function ObjectiveModule::initServer(%this)
{
if(!isObject(ImportantObjectsList))
{
new ArrayObject(ImportantObjectsList);
}
%this.queueExec("./scripts/server/Objective");
%this.queueExec("./scripts/server/serverCommands");
%this.queueExec("./scripts/server/ObjectiveTemplate");
%this.queueExec("./scripts/managedData/managedObjectiveData");
%this.queueExec("./scripts/server/interop/fileCommands");
%this.queueExec("./scripts/server/interop/inventory");
}
//This is called when the server is created for an actual game/map to be played
function ObjectiveModule::onCreateGameServer(%this)
{
%this.registerDatablock("./datablocks/ObjectiveMarkers");
%this.registerDatablock("./datablocks/triggers");
}
//This is called when the server is shut down due to the game/map being exited
function ObjectiveModule::onDestroyGameServer(%this)
{
}
//This is called when the client is initially set up by the game application
function ObjectiveModule::initClient(%this)
{
//Here, we exec out keybind scripts so the player is able to move when they get into a game
%this.queueExec("./scripts/client/default.keybinds." @ $TorqueScriptFileExtension);
%this.queueExec("./scripts/profiles");
%this.queueExec("./guis/ObjectiveTrackerGUI.gui");
%this.queueExec("./guis/ObjectiveTrackerGUI");
%this.queueExec("./scripts/client/Objective");
%this.queueExec("./scripts/client/clientCommands");
}
//This is called when a client connects to a server
function ObjectiveModule::onCreateClientConnection(%this)
{
if(!isObject(ClientObjectiveList))
{
new ArrayObject(ClientObjectiveList);
}
}
//This is called when a client disconnects from a server
function ObjectiveModule::onDestroyClientConnection(%this)
{
ClientObjectiveList.delete();
}