Easter egg in the frankenturret intro!

Avatar
Theepiccake1993
29 Posts
Posted Dec 28, 2012
Wow! I have just discovered something as an easter egg that might be a bug! In the frankenturret intro in Chapter 8 of the SP storyline, while I was walking into the chamber, a cube walked on the button itself! This was in my last playthrough! Valve, was this intended as an easter egg, or as a bug? Since Franken-turrets can walk, one walked on to the edge of the button without any input from me, at all!
Advertisement
Registered users don't see ads! Register now!
Avatar
Habzs
225 Posts
Posted Dec 29, 2012
Replied 2 hours later
Franken turrets do randomly walk around. Maybe it walked onto the button its self.
Avatar
Theepiccake1993
29 Posts
Posted Dec 29, 2012
Replied 9 hours later

Habzs wrote:
Franken turrets do randomly walk around. Maybe it walked onto the button its self.

Yep! That's EXACTLY what it did!

Avatar
Lpfreaky90
2,842 Posts
Posted Dec 29, 2012
Replied 1 minutes later

Quote:
"For god's sake, you're BOXES with LEGS! It is literally your only purpose! Walking onto buttons! How can you not do the one thing you were designed for?"

Guess Whealtey was wrong after all

Avatar
Shadow
2 Posts
Posted Dec 30, 2012
Replied 22 hours later

Theepiccake1993 wrote:
Habzs wrote:

Franken turrets do randomly walk around. Maybe it walked onto the button its self.

Yep! That's EXACTLY what it did!

This has given me an awesome idea for a map lol...

Avatar
krishiv2
23 Posts
Posted Jul 12, 2013
Replied 6 months later
its awesome idea.
example: two buttons, one frankenturret we would place it so that it can walk through both the buttons
Avatar
Gemarakup
1,183 Posts
Posted Jul 12, 2013
Replied 29 minutes later
That was done with lasers.
Avatar
krishiv2
23 Posts
Posted Jul 12, 2013
Replied 2 hours later
All walls are not portalable then what would you do without cheats?
Avatar
User
630 Posts
Posted Jul 12, 2013
Replied 10 minutes later

krishiv2 wrote:
All walls are not portalable then what would you do without cheats?

Avatar
FelixGriffin
2,680 Posts
Posted Jul 12, 2013
Replied 5 hours later
One of my many unreleased projects was a vscript AI for the frankenturrets that would make them walk onto buttons and sit there if possible. But the player was considered more interesting than the button, and an open door even more so, so that they'd usually end up standing on the button to open the door, then getting excited and jumping towards the exit...off the button, closing the door again. You have to feel a little sorry for them.
Avatar
TeamSpen210
608 Posts
Posted Jul 12, 2013
Replied 1 hour later
How did you manage to do that?
Avatar
FelixGriffin
2,680 Posts
Posted Jul 12, 2013
Replied 58 minutes later
It wasn't hard, I'll post my code. Basically I would slowly turn them towards the most interesting thing they could see each time they hopped.

Script follows...
||```
// Sentient Turret Cube Script
// Includes some code from Sicklebrick (sicklebrick.com)'s "spinner.nut" script.

pickedup <- false;
boxed <- false;
target <- null;
counter <- 0;
turning <- 0;
maxturn <- 30;
disabled <- false; // A general-purpose flag that's currently unused.

EntFireByHandle( self, "AddOutput", "OnPhysGunPickup !self,runscriptcode,PickedUp()", 0 , null, null);
EntFireByHandle( self, "AddOutput", "OnPhysGunDrop !self,runscriptcode,Dropped()", 0 , null, null);
EntFireByHandle(self,"RunScriptFile","fg/libs/vector_math.nut",0.0,null,null);

function PickedUp(){
   pickedup = true;
}

function Dropped(){
   pickedup = false;
}

function Think(){
//   if(counter <= 100){counter++;}else{aim();counter-=100;}
   EntFireByHandle(self,"RunScriptCode","Think();",5.0,null,null);
   if(disabled) return;
   aim();
   track();
}

function box(){
   if(disabled) return;
   EntFireByHandle(self,"BecomeBox","",0.0,null,null);
   boxed = true;
}

function unbox(){
   if(disabled == true) return;
   EntFireByHandle(self,"BecomeMonster","",0.0,null,null);
   boxed = false;
//   disabled = true;
//   EntFireByHandle(self,"RunScriptCode","disabled = false;",1.0,null,null);
}

function turn(target_yaw){
   if(disabled == true) return;
   delta <- target_yaw - self.GetAngles().y;
   if(delta >=  180) delta -= 360;
   if(delta <= -180) delta += 360;
   delta /= maxturn;
   turning <- maxturn;
   ThinkTurn();
}

function ThinkTurn(){
   local ang = self.GetAngles();
   self.SetAngles(ang.x, ang.y+delta, ang.z);
   turning--;
   if(turning != 0) EntFireByHandle(self,"RunScriptCode","ThinkTurn();",1.0/maxturn,null,null);
}

function interest(entity){   
   if(entity == null) return -1;
   
   if(IsMultiplayer() ? (entity.GetName == "blue" || entity.GetName == "red") : entity == GetPlayer()) return 10; // Players are very interesting!
   
   if(entity.GetClassname() == "prop_floor_button") return (entity.GetTeam() == 0 ? 5 : 2); // Buttons are interesting if they aren't pressed already.
   
   if((entity.GetClassname() == "prop_testchamber_door" || entity.GetClassname() == "prop_linked_portal_door" || entity.GetClassname() == "linked_portal_door") && entity.GetTeam == 1) return 7; // Doors are interesting if they're open.
   
   if(entity.GetClassname() == "npc_portal_turret_floor") return 6; // Turrets are interesting!
   
   if(entity.GetClassname() == "trigger_portal_cleanser") return 2; // Fizzlers are interesting, sadly.
   
   if(entity.GetClassname() == "func_clip_vphysics") return 3; // Blockfields are more interesting.
   
   if(entity.GetClassname() == "prop_tractor_beam") return 6.5; // Tbeams are pretty interesting.
   
   if(entity.GetClassname() == "prop_monster_box" && entity != self) return 5.5; // Other boxes are sort of interesting.
   
   return 0;
}

function aim(){
   if(disabled == true) return;
   printl("TURRETCUBE: Aiming");
   target = null;
   local intr;
   local dist;
   local closest = 0;
   local mostInteresting = 0;
   local poi = null;
   
   do{
      target = Entities.FindInSphere(target, self.GetOrigin(), 256.0);
      if(target == null){
         break; // This should never happen!
      }
//      printl("TURRETCUBE: Found something!");
      dist = vector_length(target.GetOrigin() - self.GetOrigin());
      intr = interest(target);
//      printl("TURRETCUBE: It's "+intr);
      if(intr > mostInteresting){
//         printl("TURRETCUBE: It's my new target! It's more interesting!");
         mostInteresting = intr;
         closest = dist;
         poi = target;
      }else if(intr == mostInteresting && dist < closest){
//         printl("TURRETCUBE: It's my new target! It's closer!");
         mostInteresting = intr;
         closest = dist;
         poi = target;
      }
   }while(target != null);
   
   target = poi;
   if(target == null){
//      printl("TURRETCUBE: Nothing nearby, shutting down.");
      box();
      return;
   }
//   printl("TURRETCUBE: Decided on "+target.GetName()+" ("+target.GetClassname()+")");
   unbox();
}

function track(){
   if(disabled == true) return;
   if (target != null && pickedup == false && boxed == false){
      ppos <- target.GetCenter();
      mpos <- self.GetCenter();
      ang <- self.GetAngles();

      dx <- ppos.x - mpos.x;
      dy <- ppos.y - mpos.y;
//      dz <- ppos.z - mpos.z;
      
      yaw <- atan2(dy, dx ) * 180 / 3.14159265;
   
//      dist <- sqrt( (dx * dx) + (dy * dy) );
//      pitch <- atan2( dz , dist ) * 180 / 3.14159265 * -1
      
      turn(yaw);
   }
}

```||

Avatar
krishiv2
23 Posts
Posted Jul 20, 2013
Replied 7 days later
This thing can be done in cubes for the noobs (I don't know the actual name) the Frankenstein turret will go through the lasers,hence,deactivating the laser fields.
Advertisement
Registered users don't see ads! Register now!
Avatar
Tmast98
210 Posts
Posted Aug 19, 2013
Replied 30 days later

FelixGriffin wrote:
It wasn't hard, I'll post my code. Basically I would slowly turn them towards the most interesting thing they could see each time they hopped.

Script follows...
||```
// Sentient Turret Cube Script
// Includes some code from Sicklebrick (sicklebrick.com)'s "spinner.nut" script.

pickedup <- false;
boxed <- false;
target <- null;
counter <- 0;
turning <- 0;
maxturn <- 30;
disabled <- false; // A general-purpose flag that's currently unused.

EntFireByHandle( self, "AddOutput", "OnPhysGunPickup !self,runscriptcode,PickedUp()", 0 , null, null);
EntFireByHandle( self, "AddOutput", "OnPhysGunDrop !self,runscriptcode,Dropped()", 0 , null, null);
EntFireByHandle(self,"RunScriptFile","fg/libs/vector_math.nut",0.0,null,null);

function PickedUp(){
   pickedup = true;
}

function Dropped(){
   pickedup = false;
}

function Think(){
//   if(counter <= 100){counter++;}else{aim();counter-=100;}
   EntFireByHandle(self,"RunScriptCode","Think();",5.0,null,null);
   if(disabled) return;
   aim();
   track();
}

function box(){
   if(disabled) return;
   EntFireByHandle(self,"BecomeBox","",0.0,null,null);
   boxed = true;
}

function unbox(){
   if(disabled == true) return;
   EntFireByHandle(self,"BecomeMonster","",0.0,null,null);
   boxed = false;
//   disabled = true;
//   EntFireByHandle(self,"RunScriptCode","disabled = false;",1.0,null,null);
}

function turn(target_yaw){
   if(disabled == true) return;
   delta <- target_yaw - self.GetAngles().y;
   if(delta >=  180) delta -= 360;
   if(delta <= -180) delta += 360;
   delta /= maxturn;
   turning <- maxturn;
   ThinkTurn();
}

function ThinkTurn(){
   local ang = self.GetAngles();
   self.SetAngles(ang.x, ang.y+delta, ang.z);
   turning--;
   if(turning != 0) EntFireByHandle(self,"RunScriptCode","ThinkTurn();",1.0/maxturn,null,null);
}

function interest(entity){   
   if(entity == null) return -1;

if(IsMultiplayer() ? (entity.GetName == "blue" || entity.GetName == "red") : entity == GetPlayer()) return 10; // Players are very interesting!

if(entity.GetClassname() == "prop_floor_button") return (entity.GetTeam() == 0 ? 5 : 2); // Buttons are interesting if they aren't pressed already.

if((entity.GetClassname() == "prop_testchamber_door" || entity.GetClassname() == "prop_linked_portal_door" || entity.GetClassname() == "linked_portal_door") && entity.GetTeam == 1) return 7; // Doors are interesting if they're open.

if(entity.GetClassname() == "npc_portal_turret_floor") return 6; // Turrets are interesting!

if(entity.GetClassname() == "trigger_portal_cleanser") return 2; // Fizzlers are interesting, sadly.

if(entity.GetClassname() == "func_clip_vphysics") return 3; // Blockfields are more interesting.

if(entity.GetClassname() == "prop_tractor_beam") return 6.5; // Tbeams are pretty interesting.

if(entity.GetClassname() == "prop_monster_box" && entity != self) return 5.5; // Other boxes are sort of interesting.

return 0;
}

function aim(){
   if(disabled == true) return;
   printl("TURRETCUBE: Aiming");
   target = null;
   local intr;
   local dist;
   local closest = 0;
   local mostInteresting = 0;
   local poi = null;

do{
      target = Entities.FindInSphere(target, self.GetOrigin(), 256.0);
      if(target == null){
         break; // This should never happen!
      }
//      printl("TURRETCUBE: Found something!");
      dist = vector_length(target.GetOrigin() - self.GetOrigin());
      intr = interest(target);
//      printl("TURRETCUBE: It's "+intr);
      if(intr > mostInteresting){
//         printl("TURRETCUBE: It's my new target! It's more interesting!");
         mostInteresting = intr;
         closest = dist;
         poi = target;
      }else if(intr == mostInteresting && dist < closest){
//         printl("TURRETCUBE: It's my new target! It's closer!");
         mostInteresting = intr;
         closest = dist;
         poi = target;
      }
   }while(target != null);

target = poi;
   if(target == null){
//      printl("TURRETCUBE: Nothing nearby, shutting down.");
      box();
      return;
   }
//   printl("TURRETCUBE: Decided on "+target.GetName()+" ("+target.GetClassname()+")");
   unbox();
}

function track(){
   if(disabled == true) return;
   if (target != null && pickedup == false && boxed == false){
      ppos <- target.GetCenter();
      mpos <- self.GetCenter();
      ang <- self.GetAngles();

dx <- ppos.x - mpos.x;
      dy <- ppos.y - mpos.y;
//      dz <- ppos.z - mpos.z;

yaw <- atan2(dy, dx ) * 180 / 3.14159265;

//      dist <- sqrt( (dx * dx) + (dy * dy) );
//      pitch <- atan2( dz , dist ) * 180 / 3.14159265 * -1

turn(yaw);
   }
}

```||

I love how you say that isn't hard , shows how experienced you are!

As for the cube's though, they shouldn't be able to trigger the button, there's a trigger around it which forces the cube from the "monster" state, to the "cube" state. Somehow the frankenturret glitched onto the button I guess