[Solved] (not) Detecting Disabled Portals
Quote from FelixGriffin on April 26, 2013, 6:06 pmThere 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)
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)
Quote from Sprowl on April 28, 2013, 3:42 pmYour 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::0FizzlePortalRelay (logic_relay):
- Code: Select all
OnTrigger > BluePortal > FireUser 1
OnTrigger > OrangePortal > FireUser 1
OnTrigger > self > DisableBluePortal / OrangePortal (prop_portal):
- Code: Select all
OnUser 1 > NewLocation > 0 0 0 0 0 0
OnUser 1 > SetActivatedState > 0
OnPlacedSuccessfully > FizzlePortalRelay > EnableBugfree and easy, just as it should be
.
Thanks Felix
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
.
Thanks Felix
