Please or Register to create posts and topics.

[Solved] (not) Detecting Disabled Portals

PreviousPage 2 of 2

There is a slightly easier way. Try this in a precache or OnMapSpawn script.

Code: Select all
ent <- null;

do{
    ent = Entities.FindByClassname("trigger_portal_cleanser");
    if(ent == null) break;
    EntFireByHandle(ent,"AddOutput","OnFizzle prop_portal:FireUser1::0:-1",0.0,null,null);
}while(true);

Then make a box with the inactive portals in it at the start so you can give them outputs. Add to each one:

Code: Select all
OnUser1 > !self > RunScriptCode > self.SetOrigin(0,0,0)
Falsi sumus crusto!

Your script didn't work, but I used its idea and rebuild it with entites:

logic_auto:

Code: Select all
OnMapSpawn > trigger_portal_cleanser > AddOutput > OnFizzle FizzlePortalRelay:Trigger::0

FizzlePortalRelay (logic_relay):

Code: Select all
OnTrigger > BluePortal > FireUser 1
OnTrigger > OrangePortal > FireUser 1
OnTrigger > self > Disable

BluePortal / OrangePortal (prop_portal):

Code: Select all
OnUser 1 > NewLocation > 0 0 0 0 0 0
OnUser 1 > SetActivatedState > 0
OnPlacedSuccessfully > FizzlePortalRelay > Enable

Bugfree and easy, just as it should be :-D .
Thanks Felix

PreviousPage 2 of 2