Mathcounters Can't count?
Quote from Fracture on March 25, 2012, 2:32 amI got multiple trigger attached to a mathcounter
there is enabling and disabling involved to prevent them from getting triggered when i don't need them to be, but when they are enabled, the mathcounter activates when only a single trigger is hit rather than the allocated number of triggers needed.
DAFUQ?!
I got multiple trigger attached to a mathcounter
there is enabling and disabling involved to prevent them from getting triggered when i don't need them to be, but when they are enabled, the mathcounter activates when only a single trigger is hit rather than the allocated number of triggers needed.
DAFUQ?!
Quote from ChickenMobile on March 25, 2012, 3:02 amYou must minus from the math_counter once you 'endTouch' it otherwise it will not minus from the counter(I assume you have a number of triggers which add to the counter and OnHitMax the counter does the event).
You must minus from the math_counter once you 'endTouch' it otherwise it will not minus from the counter(I assume you have a number of triggers which add to the counter and OnHitMax the counter does the event).
Quote from Fracture on March 25, 2012, 3:17 ami actually did that, still effing up. Im just gonna replace the triggers with hidden floor buttons, see if that effects it.
You would not beleive how many times i have had to redo an entire concept due to lack of forsight on how all this is works. This map is gonna be pretty huge
i actually did that, still effing up. Im just gonna replace the triggers with hidden floor buttons, see if that effects it.
You would not beleive how many times i have had to redo an entire concept due to lack of forsight on how all this is works. This map is gonna be pretty huge
Quote from Lpfreaky90 on March 25, 2012, 6:14 amFracture wrote:i actually did that, still effing up. Im just gonna replace the triggers with hidden floor buttons, see if that effects it.You would not beleive how many times i have had to redo an entire concept due to lack of forsight on how all this is works. This map is gonna be pretty huge
Hidden floor buttons seems like a bad idea to me. Can you upload a vmf with just the logic you're trying to use?
Usually you'll have:
math counter:
initial value: 0
Max value: 2
OnHitMax <<do stuff>>
OnChangedFromMax <<stop doing stuff>>button:
Onpressed: math_counter; add; 1
Onunpressed: math_counter; subtract 1 or math_counter; add; -1trigger_multiple:
OnStartTouch: math_counter; add; 1
OnEndTouch: math_counter; subtract 1/add-1Make sure the reset interval for the trigger_multiple is also good.
You would not beleive how many times i have had to redo an entire concept due to lack of forsight on how all this is works. This map is gonna be pretty huge
Hidden floor buttons seems like a bad idea to me. Can you upload a vmf with just the logic you're trying to use?
Usually you'll have:
math counter:
initial value: 0
Max value: 2
OnHitMax <<do stuff>>
OnChangedFromMax <<stop doing stuff>>
button:
Onpressed: math_counter; add; 1
Onunpressed: math_counter; subtract 1 or math_counter; add; -1
trigger_multiple:
OnStartTouch: math_counter; add; 1
OnEndTouch: math_counter; subtract 1/add-1
Make sure the reset interval for the trigger_multiple is also good.
Quote from HMW on March 25, 2012, 10:34 amIf you can't get it to work with the counter, try this alternative method:
Create a logic_branch for each trigger and set the following outputs on the trigger:
- OnStartTouch: logic_branch; SetValue; 1
- OnEndTouchAll: logic_branch; SetValue; 0Then create one logic_branch_listener with references to all logic_branch entities involved. Give it the following outputs:
- OnAllTrue: do stuff...
- OnAllFalse: stop doing stuff...
- OnMixed: also stop doing stuff...
If you can't get it to work with the counter, try this alternative method:
Create a logic_branch for each trigger and set the following outputs on the trigger:
- OnStartTouch: logic_branch; SetValue; 1
- OnEndTouchAll: logic_branch; SetValue; 0
Then create one logic_branch_listener with references to all logic_branch entities involved. Give it the following outputs:
- OnAllTrue: do stuff...
- OnAllFalse: stop doing stuff...
- OnMixed: also stop doing stuff...
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Quote from Fracture on March 25, 2012, 3:46 pmI finally got it to work like IPfreaky said it should. The problem was the trigger input wasn't correct.
Now i got a new error that popped up for the first time for no apparent reason. I have a movelinear as an elevator, i used it several times to test it out along with many elevators under the same design. But all of a sudden an error spammed saying Calculators entities(player and movelinear) At that moment my jump was stunted and i couldnt fire portals anymore
and i only got this error on the one movelinear out of them all
I finally got it to work like IPfreaky said it should. The problem was the trigger input wasn't correct.
Now i got a new error that popped up for the first time for no apparent reason. I have a movelinear as an elevator, i used it several times to test it out along with many elevators under the same design. But all of a sudden an error spammed saying Calculators entities(player and movelinear) At that moment my jump was stunted and i couldnt fire portals anymore
and i only got this error on the one movelinear out of them all
Quote from ChickenMobile on March 25, 2012, 9:34 pmMovelinear can be very buggy. If it is a multi-stop lift I would use a func_tracktrain and if it is a 2 stop lift I would use a func_door.
Generally I think that any platform moving upwards (at least in Portal 2) will stop the player from jumping anyway. In Portal 1 I think you could gain momentum if you jump just before the lift stops (this is the same for HL2dm and CS:S)
I believe that error appears when (apparently) a movement is invalid. If the platform is moving incredibly fast, you could create a heap of these errors.
Movelinear can be very buggy. If it is a multi-stop lift I would use a func_tracktrain and if it is a 2 stop lift I would use a func_door.
Generally I think that any platform moving upwards (at least in Portal 2) will stop the player from jumping anyway. In Portal 1 I think you could gain momentum if you jump just before the lift stops (this is the same for HL2dm and CS:S)
I believe that error appears when (apparently) a movement is invalid. If the platform is moving incredibly fast, you could create a heap of these errors.
Quote from Fracture on March 25, 2012, 10:07 pmdamn. i will look up that func_door thing
EDIT: i think the damn file has been corrupted, i removed the whole elevator and i still cant fire portals at all within the area. WTF?!
damn. i will look up that func_door thing
EDIT: i think the damn file has been corrupted, i removed the whole elevator and i still cant fire portals at all within the area. WTF?!

