sHatchling
0
-1
-155
0
<undefined>
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
image_speed = 0.25;
targetx = x;
targety = y;
accel = 0.4;
maxspeed = 3;
followplayer = 1;
roaring = 0;
alarm[0] = 120 + random(100);
mealtimer = 0;
flash = 0;
chaseX = 0;
alarm1set = 0;
myid = 0;
name = "";
1
603
7
0
0
-1
2
self
0
0
1
chaseX = 1;
followplayer = 0;
1
603
7
0
0
-1
2
self
0
0
1
if(myid == 0){
if(sprite_index != sFedtogg) sfx_play(choose(sndHatchling,sndHatchling2,sndHatchling3,sndHatchling4));
if(sprite_index == sFedtogg) sfx_play(choose(sndSeptogg1, sndSeptogg2, sndSeptogg3));
alarm[0] = 300 + irandom(320);
roaring = 60;
}
/*sfx_play(sndHatchling);
1
603
7
0
0
-1
2
self
0
0
1
if(myid == 0 && instance_exists(oClient) && string_lower(oClient.name) == "shirty"){
if(sprite_index != sFedtogg) sprite_index = sFedtogg;
image_speed = 0.33;
}
if(myid != 0 && string_lower(name) == "shirty"){
if(sprite_index != sFedtogg) sprite_index = sFedtogg;
image_speed = 0.33;
}
if(myid == 0){
if (global.event[304] == 1 && distance_to_object(oA7Crystal1) < 120) {
tgtobj = instance_nearest(x, y, oA7Crystal1);
if (tgtobj != -4) {
targetx = tgtobj.x + 8;
targety = tgtobj.y + 8;
accel = 0.4;
maxspeed = 3.2;
if (mealtimer > 600) accel *= 2;
}
followplayer = 0;
}
else if (distance_to_object(oXPickup) < 150 ) {
if (chaseX == 1)
{
tgtobj = instance_nearest(x, y, oXPickup);
if (tgtobj != -4) {
targetx = tgtobj.x;
targety = tgtobj.y - 11;
accel = 0.4;
maxspeed = 3.2;
if (mealtimer > 600) accel *= 2;
}
followplayer = 0;
}
else if (alarm1set == 0)
{
alarm1set = 1;
alarm[1] = 45;
}
}
else
{
followplayer = 1;
chaseX = 0;
alarm1set = 0;
}
} else {
if(instance_exists(oClient)){
if(ds_list_size(global.hatchlingList) > 0){
var findHatchlingID = ds_list_find_index(global.hatchlingList, myid);
if(findHatchlingID == -1){
instance_destroy();
}
} else {
instance_destroy();
}
} else {
instance_destroy();
}
}
/*
else if (distance_to_object(oEnemy) < 120 ) {
if (chaseX == 1)
{
tgtobj = instance_nearest(x, y, oEnemy);
if (tgtobj != -4) {
targetx = tgtobj.x;
targety = tgtobj.y - 11;
accel = 0.4;
maxspeed = 3.2;
if (mealtimer > 600) accel *= 2;
}
followplayer = 0;
}
else if (alarm1set == 0)
{
alarm1set = 1;
alarm[1] = 90;
}
}
*/
if (followplayer && myid == 0) {
targetx = oCharacter.x;
targety = oCharacter.y - 30;
if (distance_to_point(oCharacter.x, oCharacter.y - 16) > 128) {
accel = 0.8;
maxspeed = 8;
}
if (distance_to_point(oCharacter.x, oCharacter.y - 16) > 64) {
accel = 0.6;
maxspeed = 6;
} else if (distance_to_point(oCharacter.x, oCharacter.y - 16) > 32) {
accel = 0.4;
maxspeed = 4;
} else {
accel = 0.3;
maxspeed = 2.5;
}
} else if(followplayer && myid != 0){
if(instance_exists(oClient)){
if(ds_list_size(global.hatchlingList) > 0){
var findHatchlingID = ds_list_find_index(global.hatchlingList, myid);
if(findHatchlingID >= 0){
if(ds_list_size(oClient.roomListData) > 0){
for(var h=0; h<ds_list_size(oClient.roomListData); h++){
var arrList = oClient.roomListData[| h];
var arrID = arrList[0];
var arrX = arrList[1];
var arrY = arrList[2];
if(arrID == myid){
targetx = arrX;
targety = arrY - 30;
if (distance_to_point(arrX, arrY - 16) > 128) {
accel = 0.8;
maxspeed = 8;
}
if (distance_to_point(arrX, arrY - 16) > 64) {
accel = 0.6;
maxspeed = 6;
} else if (distance_to_point(arrX, arrY - 16) > 32) {
accel = 0.4;
maxspeed = 4;
} else {
accel = 0.3;
maxspeed = 2.5;
}
}
}
} else {
instance_destroy();
}
}
}
}
}
if (roaring > 0) {
roaring -= 1;
image_speed = 1;
} else if (image_speed > 0.25) image_speed -= 0.1;
if (flash > 0) flash -= 0.1;
gravity_direction = point_direction(x, y, targetx, targety);
gravity = accel;
if (speed > 4) speed = maxspeed;
mealtimer += 1;
1
603
7
0
0
-1
2
self
0
0
1
if(myid == 0){
draw_self();
draw_set_blend_mode(bm_add);
draw_sprite_ext(sprite_index, -1, x, y, 1, 1, 0, -1, flash);
draw_set_blend_mode(bm_normal);
} else {
if(global.shaders_compiled && os_type != os_android){
pal_swap_set(oControl.MultitroidBabyPalette, myid, false);
}
draw_self();
draw_sprite_ext(sprite_index, -1, x, y, 1, 1, 0, -1, flash);
pal_swap_reset();
shader_reset();
}
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
-1