Information about object: server

Sprite: TeleIn
Solid: false
Visible: true
Depth: -2
Persistent: false
Parent: <no parent>
Mask: NaviMask

Create Event:
execute code:

if(global.jid >= 0)
{
sprite_index = JoinIn;
x = global.p_x[global.jid];
y = global.p_y[global.jid]+1;
change_area(global.p_area[global.jid]);
global.jid = -1;
}

tcollide = 1;
image_speed = 1;
curspeed = 3;
//dir = 2

Alarm Event for alarm 0:
execute code:

online_room(global.posenter);

Alarm Event for alarm 1:
execute code:

if(global.p_room[global.jid] != room)
{
online_room(global.p_room[global.jid]);
}
else
{
if(global.jid == 99)
{
caddline("Saved from the digital abyss. You might not be so lucky next time!",c_red);
}
visible = 1;
sprite_index = JoinIn;
x = global.p_x[global.jid];
y = global.p_y[global.jid]+1;
change_area(global.p_area[global.jid]);
global.jid = -1;
}

Alarm Event for alarm 2:
execute code:

if(hxdeny)
{

if(hxpdir == 0)
{
direction = 90;
speed = 0.2;
}
if(hxpdir == 1)
{
direction = 270;
speed = 0.2;
}
if(hxpdir == 2)
{
direction = 180;
speed = 0.2;
}
if(hxpdir == 3)
{
direction = 0;
speed = 0.2;
}

alarm[3] = 10;

}
else
{
sprite_index = HexportOut;
}

Alarm Event for alarm 3:
execute code:

hxdeny = 0;

 Step Event:
execute code:

//Depth
if(sprite_index != Hexport && sprite_index != HexportIn && sprite_index != HexportOut)
{
depth = (y+43)*-1
if(mask_index != NaviMask && sprite_index != HexportOut)
{
mask_index = NaviMask;
}
}
else if(sprite_index == HexportIn || sprite_index == HexportOut)
{
if(depth != -1 && ((sprite_index == HexportOut && image_index >= 26) || (sprite_index == HexportIn && image_index <= 23)))
{
depth = -1;
}
else
{
depth = (y+23)*-1;
}
}
else if(depth != 3 && sprite_index == Hexport)
{
depth = 3;
mask_index = HexportMask;
}


//Hexporting Speed
if(sprite_index == Hexport && speed > 0 && speed < 8)
{
speed += 0.2;
}
else if(speed > 8)
{
speed = 8;
}


//Movement Tiles
if(sprite_index != Hexport && sprite_index != HexportIn && sprite_index != HexportOut && sprite_index != TeleIn && sprite_index != TeleOut && sprite_index != JoinIn && sprite_index != JoinOut)
{

if(position_meeting(x+18,y+43,mtile1r))
{
srspeed += 2;
}
else if(position_meeting(x+18,y+43,mtile1l))
{
slspeed += 2;
}
else if(position_meeting(x+18,y+43,mtile1u))
{
suspeed += 2;
}
else if(position_meeting(x+18,y+43,mtile1d))
{
sdspeed += 2;
}
srspeed -= 1;
slspeed -= 1;
suspeed -= 1;
sdspeed -= 1;
if(srspeed > 6) {srspeed = 6;}
if(slspeed > 6) {slspeed = 6;}
if(suspeed > 6) {suspeed = 6;}
if(sdspeed > 6) {sdspeed = 6;}
if(srspeed < 0) {srspeed = 0;}
if(slspeed < 0) {slspeed = 0;}
if(suspeed < 0) {suspeed = 0;}
if(sdspeed < 0) {sdspeed = 0;}
x += srspeed;
x -= slspeed;
y -= suspeed;
y += sdspeed;

if(curspeed != speed && speed != 0)
{
speed = curspeed;
}

}

if(tcollide == 0 && sprite_index != JoinIn && sprite_index != JoinOut && sprite_index != Hexport && sprite_index != HexportOut && sprite_index != HexportIn)
{
global.jid = 99
global.p_x[global.jid] = xstart;
global.p_y[global.jid] = ystart;
global.p_area[global.jid] = global.area;
global.p_room[global.jid] = room;
sprite_index = JoinOut;
}

if(sprite_index == TeleIn || sprite_index == TeleOut || sprite_index == JoinIn || sprite_index == JoinOut)
{
image_speed = 1;
speed = 0;
}
else if(sprite_index == HexportOut || sprite_index == HexportIn)
{
image_speed = 0.8;
speed = 0;
}

tcollide = 0;

Collision Event with object tile1:
execute code:

tcollide = 1;

Collision Event with object mplatparent:
execute code:

tcollide = 1;

Keyboard Event for <Left> Key:
execute code:

if(mobilecheck())
{

left = 1;
if(right)
{
direction = 180
speed = 0
sprite_index = NaviStandL
}
else if(up)
{
direction = 135
speed = curspeed
sprite_index = NaviRunUL
}
else if(down)
{
direction = 225
speed = curspeed
sprite_index = NaviRunDL
}
else
{
direction = 180
speed = curspeed
sprite_index = NaviRunL
}

}

Keyboard Event for <Up> Key:
execute code:

if(mobilecheck())
{

up = 1;
if(down)
{
direction = 90
speed = 0
sprite_index = NaviStandU
}
else if(left)
{
direction = 135
speed = curspeed
sprite_index = NaviRunUL
}
else if(right)
{
direction = 45
speed = curspeed
sprite_index = NaviRunUR
}
else
{
direction = 90
speed = curspeed
sprite_index = NaviRunU
}

}

Keyboard Event for <Right> Key:
execute code:

if(mobilecheck())
{

right = 1;
if(left)
{
direction = 0
speed = 0
sprite_index = NaviStandR
}
else if(up)
{
direction = 45
speed = curspeed
sprite_index = NaviRunUR
}
else if(down)
{
direction = 315
speed = curspeed
sprite_index = NaviRunDR
}
else
{
direction = 0
speed = curspeed
sprite_index = NaviRunR
}

}

Keyboard Event for <Down> Key:
execute code:

if(mobilecheck())
{

down = 1;
if(up)
{
direction = 270
speed = 0
sprite_index = NaviStandD
}
else if(left)
{
direction = 225
speed = curspeed
sprite_index = NaviRunDL
}
else if(right)
{
direction = 315
speed = curspeed
sprite_index = NaviRunDR
}
else
{
direction = 270
speed = curspeed
sprite_index = NaviRunD
}

}

Other Event: Game End:
execute code:

dllfree();

Other Event: Animation End:
execute code:

if(sprite_index == TeleIn || sprite_index == JoinIn)
{
image_speed = curspeed/10;
sprite_index = NaviStandD;
}
else if(sprite_index == TeleOut)
{
visible = 0;
sprite_index = sprite44;
alarm[0] = 10;
}

else if(sprite_index == JoinOut && global.jid >= 0)
{
visible = 0;
sprite_index = sprite44;
if(global.p_room[global.jid] != room)
{
room_update(global.p_room[global.jid]);
}
alarm[1] = 10;
}

else if(sprite_index == HexportIn)
{
sprite_index = Hexport;
image_speed = 0.6;
hxdeny = 1;
alarm[2] = 5;
}
else if(sprite_index == HexportOut)
{
sprite_index = NaviStandD;
tcollide = 1;
image_speed = curspeed/10;
y -= 23;
x += 4;
}

Draw Event:
execute code:

font_color = c_aqua;
font_name = "fixedsys";

draw_sprite(sprite_index,-1,x,y);
if(sprite_index != TeleIn && sprite_index != TeleOut && sprite_index != JoinIn && sprite_index != JoinOut && sprite_index != HexportIn && sprite_index != HexportOut && sprite_index != Hexport)
{
draw_text(x+(sprite_width/2)-(string_width(global.playername)/2),y-16,global.playername);
}
if(sprite_index == JoinIn)
{
draw_sprite(JoinInR,-1,x,y);
}
if(sprite_index == JoinOut)
{
draw_sprite(JoinOutR,-1,x,y);
}

Key Press Event for <Insert> Key:
execute code:

if(sprite_index != TeleIn && sprite_index != TeleOut && sprite_index != sprite44 && sprite_index != JoinIn && sprite_index != JoinOut && sprite_index != HexportIn && sprite_index != HexportOut && sprite_index != Hexport)
{

if(curspeed == 3)
{
curspeed = 5;
image_speed = 0.5;
}
else
{
curspeed = 3;
image_speed = 0.3;
}

}

Key Press Event for R-key Key:
execute code:

if(keyboard_check(vk_control) && sprite_index != TeleIn && sprite_index != TeleOut && sprite_index != sprite44 && sprite_index != JoinIn && sprite_index != JoinOut && sprite_index != HexportIn && sprite_index != HexportOut && sprite_index != Hexport)
{

if(curspeed == 3)
{
curspeed = 5;
image_speed = 0.5;
}
else
{
curspeed = 3;
image_speed = 0.3;
}

}

Key Release Event for <Left> Key:
execute code:

left = 0;

if(mobilecheck())
{

if(!up && !down && !right)
{
direction = 180
speed = 0
sprite_index = NaviStandL
}

}

Key Release Event for <Up> Key:
execute code:

up = 0;

if(mobilecheck())
{

if(!left && !down && !right)
{
direction = 90
speed = 0
sprite_index = NaviStandU
}

}

Key Release Event for <Right> Key:
execute code:

right = 0;

if(mobilecheck())
{

if(!up && !down && !left)
{
direction = 0
speed = 0
sprite_index = NaviStandR
}

}

Key Release Event for <Down> Key:
execute code:

down = 0;

if(mobilecheck())
{

if(!up && !left && !right)
{
direction = 270
speed = 0
sprite_index = NaviStandD
}

}
