A math counter that cannot count

Avatar
Fracture
797 Posts
Posted Jul 26, 2012
My minigame is supposed to end after 15 triggers are set off that each add one number to a mathcounter set to go off at the number 15. For some reason it goes off at 14 instead. I have tested it over and over again and it does the same thing every time.

Thoughts?

Advertisement
Registered users don’t see ads! Register now!
Avatar
Lpfreaky90
2,842 Posts
Posted Jul 26, 2012
Replied 10 minutes later
Do you have:
* initial value 0
* Max value 15
* OnHitMax (do stuff)

Only 15 inputs that say add 1?
Not accidentally two times add 1 or add 2 somewhere?

Avatar
Fracture
797 Posts
Posted Jul 26, 2012
Replied 8 hours later
yup. i looked everything over, it doesn't have too many or too few inputs, the correct numbers are being added. And I know the final trigger wasn't set off because it does a few other things too. I don't get what is wrong
Avatar
Lpfreaky90
2,842 Posts
Posted Jul 26, 2012
Replied 15 minutes later
upload your vmf and I can take a look:)
Avatar
Alexander Bell
306 Posts
Posted Jul 26, 2012
Replied 1 minute later
If its going off one too soon, why not try changing 15 to 16?
Avatar
Lpfreaky90
2,842 Posts
Posted Jul 26, 2012
Replied 12 minutes later

Alexander Bell wrote:
If its going off one too soon, why not try changing 15 to 16?

because it's often better to solve the problem rather then working around it.

Avatar
Fracture
797 Posts
Posted Jul 26, 2012
Replied 19 minutes later

Alexander Bell wrote:
If its going off one too soon, why not try changing 15 to 16?

not sure if good idea...

but why dont you all take a look. I extracted the parts that effect the end of the game and placed it in a new vmf.

Avatar
Skotty
671 Posts
Posted Jul 26, 2012
Replied 2 hours later
Somehow this is a joke or you just uploaded something that isn't any help for us to help you.
Avatar
msleeper
4,136 Posts
Admin
Posted Jul 26, 2012
Replied 8 minutes later
http://www.youtube.com/watch?v=DCaXycaYDhQ
Avatar
Fracture
797 Posts
Posted Jul 26, 2012
Replied 1 hour later
wait.... lemme check what i just did.

Okay i think i removed the turret ammo this time. :razz:

What you had to do was kill the turrets to win the game. The cubes keep spawning away from where they are aligned in the vmf. I don't know why the hell that always happen. But you can just enter noclip and toss the cubes at them. They are set to explode. once all 15 are dead the vacuum tube is supposed to rise upwards. But this happens when only 14 die

I will come back later to double check this. I gotta go to work

Avatar
Lpfreaky90
2,842 Posts
Posted Jul 26, 2012
Replied 1 hour later
vmf > bsp if it comes to finding problems :wink:
Avatar
Fracture
797 Posts
Posted Jul 27, 2012
Replied 7 hours later
oops, wrong one. lol
Avatar
Skotty
671 Posts
Posted Jul 27, 2012
Replied 7 hours later
I found the possible mistake just by counting the inputs of the math_counter.
trigger_clease11 has the Add 1 output twice.

The cubes are spawning at some other position because env_entity_maker is moving them.
It uses the cubes position relative to the point_template, but if the entity_maker is moved, it also moves them.
I don't see any reason why you would need a env_entity_maker here, they are just for parenting spawns to something, or giving them speed. Just trigger the template itself with "ForceSpawn".

And because all cubes will hit their target now, you should remove all unnecessary cubes, 240 are really a lot.

You can also safe a lot of brushes. Just make these triggers surrounding a turret one brush, not a hollow one consisting out of 5 brushes. Because you don't have the NPC flag enabled, nothing should happen. If it still triggers the trigger, just use filter_class.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Fracture
797 Posts
Posted Jul 27, 2012
Replied 8 hours later
Well that makes sense now. Don't know how i added the output twice, probably by accident. I also didn't know templates could also spawn. The arrangements of the cubes was just put in there for this test to see what wasn't working. The final map actually utilizes one cube at a time, mounted to a makeshift cannon