multicompare help needed

Need Help? The Day isnt going so well on the Mapping front?
Post Reply
minus_273c
Vertex
Vertex
Posts: 15
Joined: Sat Feb 23, 2008 10:58 am

multicompare help needed

Post by minus_273c »

Anyone got experience of multicompare? I'm working on a puzzle that involves 2 people having to activate separate switches at the same time.

I'm using 2 buttons feeding a multicompare with the multicompare driving the door. Trouble is that the bloody door keeps opening on one switch.

Should you use overides on the multicompare's inputs, and then trigger a compare, because that isn't working for me.

The description in the help doesn't and I can't find any examples on the net.

Any data or URLs for examples would be welcome.

Thanks,

CJ
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

I'm not 100% sure, but isn't multicompare a hl1 entity in the mod. Try using a logic_compare.
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
DaMaN
npc_combinegunship
npc_combinegunship
Posts: 782
Joined: Tue Nov 07, 2006 12:03 am
Location: Parent's Basement
Contact:

Post by DaMaN »

I don't think the multicompare will work in your case... I've never gotten it working properly.

What I would recommend is using a math_counter. Here's what you do:

Set the math_counter's name to "door_counter" (or something similar), with the start value as 0 and the max as 2. Set it's output to open your door.

Now, take one of your buttons and add two outputs. The first output should be "OnIn, door_counter, Add, 1, 0.00", the second should be "OnOut, door_counter, Subtract, 1, 0.00"

Do the same for the other button.

What happens is that when one button is pressed in, it will add 1 to the counter. When the button pops out, it will subtract 1 from the counter. So only if both buttons are down will the counter add up to 2 and open the door.

:)

EDIT: Oh, but one thing I forgot to note is that for the above example, you need to make sure the button has an auto-reset. IE it's not toggling. ;)
Last edited by DaMaN on Wed Mar 05, 2008 6:51 am, edited 1 time in total.
Current projects: Return to City 17 and Rising Dead
Also, check out my Blag: http://daman-amappersworld.blogspot.com/
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

I wanted to say math_counter but I wasn't sure how to use it in that way.
{fug makes a note}
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
DaMaN
npc_combinegunship
npc_combinegunship
Posts: 782
Joined: Tue Nov 07, 2006 12:03 am
Location: Parent's Basement
Contact:

Post by DaMaN »

Hehe, yea. Math_counter is easily one of the most flexible entities around. For examples, trigger an action after all enemies in a particular wave have been killed, detect when a player enters the correct combination in a keypad, use multiple buttons to make something go, or triggering an event after a certain number of enemies in a wave have been killed. It's pretty awesome. Coupled with a few logic_branches, you can do some pretty neat stuff!

Oh, but one thing I forgot to note is that for the above example, you need to make sure the button has an auto-reset. IE it's not toggling. ;)
Current projects: Return to City 17 and Rising Dead
Also, check out my Blag: http://daman-amappersworld.blogspot.com/
minus_273c
Vertex
Vertex
Posts: 15
Joined: Sat Feb 23, 2008 10:58 am

Post by minus_273c »

DaMaN wrote:
What I would recommend is using a math_counter. Here's what you do:

<cut>

EDIT: Oh, but one thing I forgot to note is that for the above example, you need to make sure the button has an auto-reset. IE it's not toggling. ;)
Works a treat thanks. I've actually left one switch toggling at the moment, as it lets me test on my own.

Thanks,

CJ
Post Reply