Huh I tried hosting a BBall server, so I put bball.gml in DSM plugins folder, and when I ran server, I got an error:
___________________________________________
ERROR in
action number 1
of Trigger Event: <Deleted>
for object DSMControlsController:
Error in code at line 11:
object_event_add(ScorePanel,ev_create,0,"
^
at position 18: Unknown variable ScorePanel
global.ball_grabbed = false;
global.ballTeam = TEAM_BLUE;
global.ballTeam2 = TEAM_RED;
global.activeBall = TEAM_RED;
// startup game
object_event_add(ScorePanel,ev_create,0,"
if instance_exists(CaptureZone) && global.isHost {
global.ball_grabbed = false;
global.ballTeam = TEAM_BLUE;
global.ballTeam2 = TEAM_RED;
global.activeBall = TEAM_RED;
GameServer.syncTimer = 1;
}
silentTimer = 0;
");
// continuous loop
object_event_add(ScorePanel,ev_step,ev_step_begin,"
if global.winners == -1 {
intelup = false;
with(Character) {
if (intel) {
other.intelup = true;
if (team == TEAM_RED) global.activeBall = TEAM_BLUE;
else global.activeBall = TEAM_RED;
}
if cappingPoint != noone {
if intel capper = player.team;
else continue;
doEventReturnIntel(TEAM_RED); sendEventReturnIntel(TEAM_RED);
doEventReturnIntel(TEAM_BLUE); sendEventReturnIntel(TEAM_BLUE);
global.activeBall = TEAM_RED;
intel = false;
if capper == TEAM_RED {
global.redCaps += 1;
GameServer.syncTimer = 1;
//event_user(5);
hp = 0;
} else if capper == TEAM_BLUE {
global.blueCaps += 1;
GameServer.syncTimer = 1;
//event_user(5);
hp = 0;
}
global.ball_grabbed = false;
}
}
if (!intelup) {
if (global.ball_grabbed) {
global.ball_grabbed = false;
}
}
}
");
//for capturing the "platform"
object_event_clear(CaptureZone,ev_create,0);
object_event_add(CaptureZone,ev_create,0,"
if(instance_exists(ArenaControlPoint)) {
cp = ArenaControlPoint.id;
} else if instance_exists(ControlPoint) {
cp = instance_nearest(x,y,ControlPoint);
} else cp = 9999;
");
// destroy intelligencebase collisions
object_event_clear(Character,ev_collision,IntelligenceBaseRed);
object_event_clear(Character,ev_collision,IntelligenceBaseBlue);
// reset intel correctly
object_event_add(Intelligence,ev_alarm,0,"
doEventReturnIntel(TEAM_RED); sendEventReturnIntel(TEAM_RED);
doEventReturnIntel(TEAM_BLUE); sendEventReturnIntel(TEAM_BLUE);
global.activeBall = TEAM_RED;
global.ball_grabbed = false;
");
// player touches intels
object_event_clear(Character,ev_collision,IntelligenceBlue);
object_event_clear(Character,ev_collision,IntelligenceRed);
object_event_add(Character,ev_collision,IntelligenceRed,"
if(global.isHost and !global.mapchanging) {
if (!global.ball_grabbed && global.activeBall == TEAM_RED and canGrabIntel == 1 and ubered == 0 and !cloak) {
global.ball_grabbed = true;
doEventReturnIntel(TEAM_RED); sendEventReturnIntel(TEAM_RED);
doEventReturnIntel(TEAM_BLUE); sendEventReturnIntel(TEAM_BLUE);
sendEventGrabIntel(player);
doEventGrabIntel(player);
if player.team == TEAM_BLUE {
global.ballTeam = TEAM_BLUE;
global.ballTeam2 = global.activeBall = TEAM_RED;
} else {
global.ballTeam = TEAM_RED;
global.ballTeam2 = global.activeBall = TEAM_BLUE;
}
}
}
");
object_event_add(Character,ev_collision,IntelligenceBlue,"
if(global.isHost and !global.mapchanging) {
if (!global.ball_grabbed and canGrabIntel == 1 and ubered == 0 and !cloak) {
global.ball_grabbed = true;
doEventReturnIntel(TEAM_RED); sendEventReturnIntel(TEAM_RED);
doEventReturnIntel(TEAM_BLUE); sendEventReturnIntel(TEAM_BLUE);
sendEventGrabIntel(player);
doEventGrabIntel(player);
if player.team == TEAM_BLUE {
global.ballTeam = TEAM_BLUE;
global.ballTeam2 = global.activeBall = TEAM_RED;
} else {
global.ballTeam = TEAM_RED;
global.ballTeam2 = global.activeBall = TEAM_BLUE;
}
}
}
");
// player holding intel dies
object_event_clear(Character,ev_destroy,0);
object_event_add(Character,ev_destroy,0,'
had_intel = false;
if intel && global.isHost {
global.ball_grabbed = false;
had_intel = true;
}
{
loopsoundstop(UberIdleSnd);
var map;
with(currentWeapon) {
instance_destroy();
}
with(bubble) {
instance_destroy();
}
if (intel)
{
doEventDropIntel(player);
if (global.isHost and (lastDamageSource == KILL_BOX || lastDamageSource == FRAG_BOX || lastDamageSource == PITFALL))
{
var intelTeam;
if (team == TEAM_RED)
intelTeam = TEAM_BLUE;
else if (team == TEAM_BLUE)
intelTeam = TEAM_RED;
else
show_error("Invalid team set for Character " + player.name, true);
doEventReturnIntel(intelTeam);
sendEventReturnIntel(intelTeam);
}
}
player.object=-1;
if (collision_point(x,y,SpawnRoom,0,0) && (lastDamageDealer == player || lastDamageDealer == noone))
player.alarm[5] = 1;
else
player.alarm[5] = global.Server_Respawntime;
//part type destroy
if(variable_local_exists("jumpFlameParticleType")) {
part_type_destroy(jumpFlameParticleType);
}
}
if (had_intel) {
with(Intelligence) {
//if alarm[0] >= 90 alarm[0] = 90;
}
}
');