Please or Register to create posts and topics.

Portal surface triggering

PreviousPage 3 of 3

You can, that's how I did the colorful effects in Multiportal. Those are prop_dynamics tracking the positions of the portals.

Falsi sumus crusto!

I PLAYED THAT ONE, aw how you do that? i couldn't get it to do that

Just when I think I understand the system, it changes on me.

I placed two prop_portals in valid positions in a nodraw_portalable box, then used a script to make two prop_dynamics track them.

Code: Select all
// FelixGriffin's brand new FOUR PORTAL DEVICE! Get it while supplies last!
// Requested by UsCobra11

printl("Original Model: "+EntityGroup[0].GetModelName());
printl("Original Model: "+EntityGroup[1].GetModelName());
EntityGroup[0].SetModel("models/effects/fakeportalring_color1.mdl"); //Not really necessary anymore, but it hides them well.
EntityGroup[1].SetModel("models/effects/fakeportalring_color2.mdl");

printl("ASHPD4: Models Set!");

function alert(i){
   switch(i){
      case 1:
         printl("ASHPD4: Red Placed!");
         EntityGroup[2].SetOrigin(EntityGroup[0].GetOrigin());
         local temp = EntityGroup[0].GetAngles();
         EntityGroup[2].SetAngles(temp.x+90,temp.y,temp.z);
         EntFireByHandle(EntityGroup[2],"Enable","",0,null,null);
         break;
      case 2:
         printl("ASHPD4: Orange Placed!");
         break;
      case 3:
         printl("ASHPD4: Blue Placed!");
         break;
      case 4:
         printl("ASHPD4: Purple Placed!");
         EntityGroup[3].SetOrigin(EntityGroup[1].GetOrigin());
         local temp = EntityGroup[1].GetAngles();
         EntityGroup[3].SetAngles(temp.x+90,temp.y,temp.z);
         EntFireByHandle(EntityGroup[3],"Enable","",0,null,null);
   }
}

Put this in scripts/vscripts/fg/four_portal_gun_start.nut. For the logic_script, EntityGroup 0 and 1 should be the portals, and EntityGroup 2 and 3 the models. The ALERT function places the portals and writes what happened to the console.

It shouldn't be too hard to change for trigger_pushes.

Falsi sumus crusto!

oh dear god not the scripts. (o_o)

I killed my last computer with scripts. Terrible things happen when I do scripts. Terrible things.

I might save this data for later use

Just when I think I understand the system, it changes on me.
FelixGriffin wrote:
I placed two prop_portals in valid positions in a nodraw_portalable box, then used a script to make two prop_dynamics track them.

Code: Select all
// FelixGriffin's brand new FOUR PORTAL DEVICE! Get it while supplies last!
// Requested by UsCobra11

printl("Original Model: "+EntityGroup[0].GetModelName());
printl("Original Model: "+EntityGroup[1].GetModelName());
EntityGroup[0].SetModel("models/effects/fakeportalring_color1.mdl"); //Not really necessary anymore, but it hides them well.
EntityGroup[1].SetModel("models/effects/fakeportalring_color2.mdl");

printl("ASHPD4: Models Set!");

function alert(i){
   switch(i){
      case 1:
         printl("ASHPD4: Red Placed!");
         EntityGroup[2].SetOrigin(EntityGroup[0].GetOrigin());
         local temp = EntityGroup[0].GetAngles();
         EntityGroup[2].SetAngles(temp.x+90,temp.y,temp.z);
         EntFireByHandle(EntityGroup[2],"Enable","",0,null,null);
         break;
      case 2:
         printl("ASHPD4: Orange Placed!");
         break;
      case 3:
         printl("ASHPD4: Blue Placed!");
         break;
      case 4:
         printl("ASHPD4: Purple Placed!");
         EntityGroup[3].SetOrigin(EntityGroup[1].GetOrigin());
         local temp = EntityGroup[1].GetAngles();
         EntityGroup[3].SetAngles(temp.x+90,temp.y,temp.z);
         EntFireByHandle(EntityGroup[3],"Enable","",0,null,null);
   }
}

Put this in scripts/vscripts/fg/four_portal_gun_start.nut. For the logic_script, EntityGroup 0 and 1 should be the portals, and EntityGroup 2 and 3 the models. The ALERT function places the portals and writes what happened to the console.

It shouldn't be too hard to change for trigger_pushes.

sexy scripts :thumbup:



Also, I made a map just for you! Sunset
Click Here to view my Workshop and play my puzzlemaker maps

..... ?_?

I'm going to ignore that last bit

Just when I think I understand the system, it changes on me.
PreviousPage 3 of 3