Number of Portals
Quote from Xtreger on March 4, 2014, 6:43 amIs there any way to keep a count of the number of portals in hammer, so that as soon as the player makes more than a certain number of portals in the map, I can trigger some event?
Is there any way to keep a count of the number of portals in hammer, so that as soon as the player makes more than a certain number of portals in the map, I can trigger some event?

Quote from josepezdj on March 4, 2014, 6:55 amEven thought it could be annoying to do, I think you could use func_portal_detectors in all your white tiles, then use a math_counter to store the count.
When you have your portal_detectors placed all over, use the ouput:
- OnStartTouchPortal > [math_counter_name_here] > Add > 1
And use the Maximum Legal Value math_counter's property to set the maximum number of portals allowed, and use the output OnHitMax to fire the final desired event
Even thought it could be annoying to do, I think you could use func_portal_detectors in all your white tiles, then use a math_counter to store the count.
When you have your portal_detectors placed all over, use the ouput:
- OnStartTouchPortal > [math_counter_name_here] > Add > 1
And use the Maximum Legal Value math_counter's property to set the maximum number of portals allowed, and use the output OnHitMax to fire the final desired event
Quote from Goldenknighttim on March 4, 2014, 8:05 amThere is a much easier way. Put a couple of prop_portals into your chamber. Make sure they start inactive. Make sure that the portal numbers for each of them are for portal 1 and portal 2. Then, for an output on each prop_portal, OnPlacedSuccessfully > [Math_counter_name_here] > Add > 1.
There is a much easier way. Put a couple of prop_portals into your chamber. Make sure they start inactive. Make sure that the portal numbers for each of them are for portal 1 and portal 2. Then, for an output on each prop_portal, OnPlacedSuccessfully > [Math_counter_name_here] > Add > 1.