Skip to content

Instantly share code, notes, and snippets.

@Rumrusher
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Rumrusher/8710650 to your computer and use it in GitHub Desktop.
Save Rumrusher/8710650 to your computer and use it in GitHub Desktop.
modified from 2 lorgens codes ps I have a github account who knew.
//killstreak plugin by Lorgan (original idea by Vindicator)
object_event_add(Character,ev_create,0,"
killStreak = 0;
currentStreak = global.paramPlayer.stats[KILLS];
");
object_event_add(Character,ev_step,ev_step_normal,"
if (!global.isHost) exit;
if (player.stats[KILLS] > currentStreak && player.stats[KILLS] - currentStreak != killStreak) {
var killStreakText;
killStreakText = '';
killStreak = player.stats[KILLS] - currentStreak;
var resetTimer;
resetTimer = 0;
if (killStreak == 2) {
nutsNBolts += 100;
if hp > 50 hp += 20;
currentWeapon.maxAmmo*=2;
currentWeapon.alarm[5] = -1;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
killStreakText = ' got a double kill! x2 ammo';
resetTimer = 1;
}else if (killStreak == 3) {
killStreakText = ' got a triple kill! autogun repaired';
nutsNBolts += 100;
currentWeapon.maxAmmo*=2;
with(Sentry) {
if hp > 25 hp = 70;
else hp += 10;}
currentWeapon.alarm[5] = -7;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
resetTimer = 1;
}else if (killStreak == 4){
killStreakText = ' got a mega kill! x2 ammo x2 health';
nutsNBolts += 100;
nutsNBolts = 200;
maxHp*=2;
currentWeapon.maxAmmo*=2;
if hp <= 100 hp += 100;
else hp += 20;
currentWeapon.alarm[5] = -8;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
resetTimer = 1;
}else if (killStreak == 5){
killStreakText = ' got an ultra kill! x2 ammo';
nutsNBolts += 100;
with(Character) if lastDamageDealer == other.player && timeUnscathed <= 1 hp = -50;
if hp < maxHp hp += 10;
currentWeapon.maxAmmo*=2;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
resetTimer = 1;
}else if (killStreak == 6){
killStreakText = ' got a M-M-M-Monster kill! x2 ammo';
nutsNBolts += 100;
with(Sentry) {
if hp <= 100 maxHp = 1000;
else hp += 200;}
currentWeapon.maxAmmo*=2;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
resetTimer = 1;
}else if (killStreak == 9){
killStreakText = ' got a ludicrous kill!';
nutsNBolts += 300;
currentWeapon.alarm[5] = -49;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
resetTimer = 1;
}else if (killStreak == 10){
killStreakText = ' Can Role the die! x2 ammo x2 health taunt to Roll';
nutsNBolts += 600;
currentWeapon.maxAmmo*=2;
maxHp*=2;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
resetTimer = 1;
}else if (killStreak == 12){
killStreakText = ' is merciless!';
nutsNBolts += 400;
currentWeapon.alarm[5] = 50;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
resetTimer = 1;
}else if (killStreak == 15){
killStreakText = ' is unstoppable!';
nutsNBolts += 500;
currentWeapon.alarm[5] = 50;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
resetTimer = 1;
}else if (killStreak == 20){
killStreakText = ' is GODLIKE! 777 health';
nutsNBolts += 600;
maxHp = 777;
currentWeapon.alarm[5] = 50;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
resetTimer = 1;
}else if (killStreak == 25){
killStreakText = ' is a 1337 |-|4><0|2!';
nutsNBolts += 700;
currentWeapon.alarm[5] = 50;
runPower = 50;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
resetTimer = 1;
}else if (killStreak > 29){
killStreakText = ' has a bad day!';
nutsNBolts += 800;
with(Character) if lastDamageDealer == other.player && timeUnscathed <= 1 hp = 255;
currentWeapon.alarm[5] = 50;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
}else if (killStreak > 0){
killStreakText = ' has a bad day!';
nutsNBolts += 800;
with(Sentry) {
if Sentry.hp >= 100 Sentry.maxHp = 1000;
else Sentry.hp += 2000 Sentry.maxHp = 1000;
Sentry.maxHp=maxHp*2;
Sentry.vspeed = -15 Sentry.moveStatus = 1 Sentry.xspeed = -15;}
with(Character) if lastDamageDealer == other.player && timeUnscathed <= 1 hp = 255;
currentWeapon.alarm[5] = 50;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
}else if (killStreak > 30) {killStreakText = ' should stop playing this game!';
nutsNBolts += 800;
with(Sentry) {
if hp >= 100 hp = 1000;
else hp += 2000 hp = 1000;}
currentWeapon.alarm[5] = 50;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
}if (resetTimer >= 1) {
//send to chat if possible
if (variable_global_exists('chatLog')) {
if (string_count('v3',ds_list_find_value(global.chatLog,0)) == 1) {
with(global.chatWindow) {
_message = 'O' + other.player.name + killStreakText;
_team = 0;
event_user(2);
event_user(4);
}
} else if (string_count('v5',ds_list_find_value(global.chatLog,0)) == 1) {
with(global.chatWindow) {
playerId = 254;
_message = 'O' + other.player.name + killStreakText;
_team = 0;
event_user(2);
event_user(4);
}
event_user(4);
}
}
//send to the default message thingy
var message;
message = other.player.name + killStreakText;
ServerMessageString(message,global.sendBuffer);
with NoticeO instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = message;
}
}
");
global.canRoll = true;
global.effects = 28;
global.effect[0] = " Exploded!";
global.effect[1] = " Turned into a timebomb! Detonation in 10 seconds!"
global.effect[2] = " froze for 10 seconds!";
global.effect[3] = " Lost health!"
global.effect[4] = " can't jump for 20 seconds!";
global.effect[5] = " has less gravity for 20 seconds!";
global.effect[6] = " has infinite ammo for 10 seconds!";
global.effect[7] = " became invincible for 10 seconds!";
global.effect[8] = " has instakill for 10 seconds!";
global.effect[9] = " can fly for 20 seconds!"
global.effect[10] = " has hyperspeed for 60 seconds!"
global.effect[11] = " healed!";
global.effect[12] = " became confused for 20 seconds!"
global.effect[13] = " Talks about his feelings for 20 seconds!";
global.effect[14] = " lost ammo!";
global.effect[15] = " got full ammo";
global.effect[16] = " Stomped!";
global.effect[17] = " is poisoned for 10 seconds!";
global.effect[18] = " has instant refire for 10 seconds!";
global.effect[19] = " has health regen for 20 seconds!";
global.effect[20] = " released the spies! All autoguns are sapped!";
global.effect[21] = " is a disguised spy! Kill him before he kills you!";
global.effect[22] = " is slowed for 20 seconds!";
global.effect[23] = " has built an autogun!";
global.effect[24] = " is marked for death for 20 seconds!";
global.effect[25] = " is a pacifist for 10 seconds!";
global.effect[26] = " gunspins for 20 seconds!";
global.effect[27] = " has double clip size for 20 seconds!";
object_event_add(PlayerControl,ev_create,0,"
alarm[0] = 300;
");
object_event_add(Player,ev_create,0,"iCanRoll = true;");
object_event_add(Player,ev_alarm,10,"iCanRoll = true;");
object_event_add(Character,ev_create,0,"
effect = noone;
");
object_event_add(Character,ev_destroy,0,"
if global.isHost {
if effect != noone {
ServerMessageString(player.name + ' died attempting to kick!',global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' died attempting to kick!';
global.canRoll = true;
if player.sentry != noone {
if effect == 23 && player.sentry.special {
sendEventDestruction(player, -1, -1, 0);
doEventDestruction(player, -1, -1, 0);
}
}
}
}
");
object_event_add(Character,ev_step,ev_step_normal,"
if global.isHost {
if effect != noone {
switch(effect) {
case 1:
RTDtimer -= 1;
if RTDtimer mod 30 == 0 && RTDtimer <= 90 {
ServerMessageString('Detonation in '+string(RTDtimer/30) ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = 'Detonation in '+string(RTDtimer/30);
}
if RTDtimer <= 0 {
global.canRoll = true;
effect = noone;
with(Character) {
if point_distance(x,y,other.x,other.y) < 64 {
if team != other.team or id == other.id {
lastDamageDealer = other.player;
lastDamageSource = FINISHED_OFF_GIB;
hp = -999;
}
}
}
}
break;
case 2:
RTDtimer -= 1;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' is no longer frozen.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' is no longer frozen.';
}
break;
case 4:
RTDtimer -= 1;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' can jump again.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' can jump again.';
}
break;
case 5:
if(place_free(x,y+1)) vspeed -= 0.3;
RTDtimer -= 1;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' has normal gravity again.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' has normal gravity again.';
}
break;
case 6:
currentWeapon.ammoCount = currentWeapon.maxAmmo;
RTDtimer -= 1;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' has normal ammo again.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' has normal ammo again.';
}
break;
case 7:
hp = 255;
RTDtimer -= 1;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' is no longer invincible.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' is no longer invincible.';
hp = hpBkp;
}
break;
case 8:
with(Character) if lastDamageDealer == other.player && timeUnscathed <= 1 hp = -999;
RTDtimer -= 1;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' no longer has instakill.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' no longer has instakill.';
}
break;
case 9:
doublejumpUsed = false;
RTDtimer -= 1;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' can no longer fly.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' can no longer fly.';
if player.class != CLASS_SCOUT canDoublejump = false;
}
break;
case 10:
RTDtimer -= 1;
runPower = 50;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' no longer has hyperspeed.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' no longer has hyperspeed.';
runPower = runBkp;
}
break;
case 12:
RTDtimer -= 1;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' is no longer confused.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' is no longer confused.';
}
break;
case 17:
RTDtimer -= 1;
hp -= 0.2;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' is no longer poisoned.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' is no longer poisoned.';
}
break;
case 18:
RTDtimer -= 1;
if player.class != CLASS_PYRO && player.class != CLASS_HEAVY
if currentWeapon.refireTime > 5 currentWeapon.refireTime = 5;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' no longer has instant reload.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' no longer has instant reload.';
}
break;
case 19:
RTDtimer -= 1;
if hp < maxHp hp += 1;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' no longer has health regen.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' no longer has health regen.';
}
break;
case 13:
RTDtimer -= 1;
if RTDtimer mod 7 == 0 {
var feeling;
feeling = floor(random(7))
write_ubyte(global.sendBuffer, CHAT_BUBBLE);
write_ubyte(global.sendBuffer, ds_list_find_index(global.players,player));
write_ubyte(global.sendBuffer, 22+feeling);
setChatBubble(player, 22+feeling);
}
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' has calmed down.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' has calmed down.';
}
break;
case 22:
RTDtimer -= 1;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' is no longer slowed.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' is no longer slowed.';
}
break;
case 23:
RTDtimer -= 1;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
if player.sentry != noone {
if player.sentry.special == true {
sendEventDestruction(player, -1, -1, 0);
doEventDestruction(player, -1, -1, 0);
}
}
}
break;
case 24:
RTDtimer -= 1;
if RTDtimer mod 7 == 0 {
write_ubyte(global.sendBuffer, CHAT_BUBBLE);
write_ubyte(global.sendBuffer, ds_list_find_index(global.players,player));
write_ubyte(global.sendBuffer, 49);
setChatBubble(player, 49);
}
if _hpBkp > hp {
hp -= (_hpBkp-hp)*0.3;
_hpBkp = hp;
}
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' is no longer marked for death.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' is no longer marked for death.';
}
break;
case 25:
RTDtimer -= 1;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' is no longer a pacifist.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' is no longer a pacifist.';
}
break;
case 26:
RTDtimer -= 1;
if RTDtimer <= 0 {
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' stopped gunspinning.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' stopped gunspinning.';
}
break;
case 27:
RTDtimer -= 1;
if RTDtimer <= 0 {
currentWeapon.maxAmmo/=2;
currentWeapon.ammo = min(currentWeapon.ammoCount, currentWeapon.maxAmmo);
effect = noone;
global.canRoll = true;
ServerMessageString(player.name + ' no longer has double clip size.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + ' no longer has double clip size.';
}
break;
default:
effect = noone;
}
}
//all we had to do is slap on a restriction to taunting to check if they met the killstreak requirements
if taunting && killStreak >= 10 {
if tauntindex == 0 or tauntindex == tauntlength {
if player.iCanRoll && global.canRoll {
if effect == 23 effect = 16;
effect = floor(random(global.effects));
ServerMessageString(player.name + global.effect[effect],global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = player.name + global.effect[effect];
player.iCanRoll = false;
player.alarm[10] = 1;
switch(effect) {
case 0:
effect = noone;
with(Character) {
if point_distance(x,y,other.x,other.y) < 64 {
if team != other.team or id == other.id {
lastDamageDealer = other.player;
lastDamageSource = FINISHED_OFF_GIB;
hp = -999;
}
}
}
break;
case 1:
case 2:
case 6:
case 8:
case 17:
case 18:
case 25:
global.canRoll = true;
RTDtimer = 10*30;
break;
case 3:
hp = 1;
effect = noone;
break;
case 4:
case 5:
case 12:
case 13:
case 19:
case 22:
global.canRoll = true;
RTDtimer = 20*30;
break;
case 7:
global.canRoll = false;
RTDtimer = 10*30;
hpBkp = hp;
break;
case 9:
global.canRoll = false;
RTDtimer = 20*30;
canDoublejump = true;
break;
case 10:
global.canRoll = true;
RTDtimer = 10*60;
runBkp = runPower;
runPower = 40;
break;
case 11:
effect = noone;
hp = maxHp;
case 14:
effect = noone;
currentWeapon.ammoCount = 0;
currentWeapon.alarm[5] = 50;
break;
case 15:
effect = noone;
currentWeapon.ammoCount = currentWeapon.maxAmmo;
currentWeapon.alarm[5] = -1;
break;
case 16:
effect = noone;
vspeed = 15;
moveStatus = 1;
case 20:
effect = noone;
with(Sentry) {
if hp > 25 hp = 25;
else hp = -999;
built = 0;
}
break;
case 21:
if team == TEAM_RED team = TEAM_BLUE;
else team = TEAM_RED;
break;
case 23:
global.canRoll = true;
RTDtimer = 20*30;
if player.sentry != noone {
sendEventDestruction(player, -1, -1, 0);
doEventDestruction(player, -1, -1, 0);
}
nutsNBolts += 100;
buildSentry(player,x,y,image_xscale);
player.sentry.special = true;
write_ubyte(global.sendBuffer, BUILD_SENTRY);
write_ubyte(global.sendBuffer, ds_list_find_index(global.players,player));
write_ushort(global.sendBuffer, round(x*5));
write_ushort(global.sendBuffer, round(y*5));
write_byte(global.sendBuffer, image_xscale);
break;
case 24:
_hpBkp = hp;
global.canRoll = false;
RTDtimer = 20*30;
break;
case 26:
_aimBkp = aimDirection;
global.canRoll = false;
RTDtimer = 20*30;
break;
case 27:
currentWeapon.maxAmmo*=2;
if currentWeapon.alarm[5] == -1 currentWeapon.alarm[5] = currentWeapon.reloadTime;
global.canRoll = true;
RTDtimer = 20*30;
break;
}
} else {
write_ubyte(global.sendBuffer, CHAT_BUBBLE);
write_ubyte(global.sendBuffer, ds_list_find_index(global.players,player));
write_ubyte(global.sendBuffer, 44);
setChatBubble(player, 44);
}
}
}
}
");
//super haxxing of the keybytes so clients don't spazz as much on some effects :)
object_event_clear(Character,ev_other,ev_user1);
object_event_add(Character,ev_other,ev_user1,"
switch(effect) {
case 12:
if (keyState & $20 != 0) {
keyState &= $DF;
keyState |= $40;
} else if (keyState & $40 != 0) {
keyState &= $BF;
keyState |= $20;
}
break;
case 2:
keyState &= $1F;
break;
case 4:
keyState &= $7F;
break;
case 22:
if random(1) < 0.5 keyState &= $9F;
break;
case 25:
keyState &= $E7;
break;
case 26:
aimDirection = _aimBkp + 30;
if aimDirection > 360 aimDirection -= 360;
netAimDirection = aimDirection*65536/360;
_aimBkp = aimDirection;
break;
}
pressedKeys |= keyState & ~lastKeyState;
releasedKeys |= ~keyState & lastKeyState;
lastKeyState = keyState;
");
//sentry requires a whole bunch of changes to work
object_event_add(Sentry,ev_create,0,"special = false;");
object_event_clear(Sentry,ev_step,ev_step_begin);
object_event_add(Sentry,ev_step,ev_step_begin,"
if (global.isHost and (ownerPlayer.class != CLASS_ENGINEER || team != ownerPlayer.team || collision_circle(x,y+10,25,Sentry,false,true)>=0))
{
var bad;
bad = false;
if !instance_exists(ownerPlayer.object) or ownerPlayer.object == -1 bad = true;
else if ownerPlayer.object.effect != 23 bad = true;
if bad {
sendEventDestruction(ownerPlayer, -1, -1, 0);
doEventDestruction(ownerPlayer, -1, -1, 0);
exit;
}
}
if built == 0 && vspeed == 0 {
if hp < maxHp hp+=1;
else built = 1;
image_index = floor(hp/maxHp*10);
if landed == 0 {
landed = 1;
playsound(x,y,SentryFloorSnd);
playsound(x,y,SentryBuildSnd);
}
}
if (built == 1 && currentWeapon == -1){
image_index=11;
image_speed=0;
hp=maxHp;
currentWeapon = instance_create(x,y,weapons[3]);
currentWeapon.ownerPlayer=ownerPlayer;
currentWeapon.team=team;
currentWeapon.startDirection=startDirection;
with(currentWeapon) {
event_user(0);
}
}
if (humiliated == 1 && built == 1 && currentWeapon != -1) {
event_user(1);
}
if(place_free(x,y+1)) {
vspeed += 0.6;
}
if(vspeed>10) {
vspeed=10;
}
if(abs(oldVspeed)!=0 and vspeed==0 and global.isHost)
{
write_ubyte(global.sendBuffer, SENTRY_POSITION);
write_ubyte(global.sendBuffer, ds_list_find_index(global.players, ownerPlayer));
write_ushort(global.sendBuffer, round(x*5));
write_ushort(global.sendBuffer, round(y*5));
}
oldVspeed = vspeed;
");
object_event_add(Sentry,ev_destroy,0,"
if special {
var quote;
quote = chr(39);
ownerPlayer.object.effect = noone;
ownerPlayer.object.RTDtimer = -1;
global.canRoll = true;
ServerMessageString(ownerPlayer.name + quote +'s RTD sentry was destroyed.' ,global.sendBuffer);
with(NoticeO) instance_destroy();
notice = instance_create(0, 0, NoticeO);
notice.notice = NOTICE_CUSTOM;
notice.message = ownerPlayer.name + quote +'s RTD sentry was destroyed.';
}
");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment