Portal surface triggering
// 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.
I killed my last computer with scripts. Terrible things happen when I do scripts. Terrible things.
I might save this data for later use
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.```
// FelixGriffin's brand new FOUR PORTAL DEVICE! Get it while supplies last!
// Requested by UsCobra11printl("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 ![]()
I'm going to ignore that last bit