Booleans? Created 20 years ago2003-11-07 06:17:46 UTC by Clownfish Clownfish

Created 20 years ago2003-11-07 06:17:46 UTC by Clownfish Clownfish

Posted 20 years ago2003-11-07 06:17:46 UTC Post #4159
Hi there!

I used to do some mapping a few years back and forgot a lot of it now. Maybe you can help me out.
Do I need entities with boolean (trigger on/off)-properties to act on a multisource? Like buttons etc... What if I want to use a trigger_multiple or a func_breakable to change the state of a multisource? Is there any boolean variables I can switch on and off with such an event, that can work as a master for a locked door or a multisource? I thought trigger_relay would work for this but it doesnt... How do I do it? :

Right now I want to shoot a lock to UNLOCK a door (not just open it - I did that).... Whattayasay?
Posted 20 years ago2003-11-07 10:00:51 UTC Post #4178
I have no idea; think that works fine, pretty sure I've done it myself before. Not positive, though.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 20 years ago2003-11-07 16:35:25 UTC Post #4191
boolean. is this sum sort of made up word like "supercalifragalisticexpialidochious" or "peace"?
Posted 20 years ago2003-11-07 16:39:57 UTC Post #4193
PLEASE DON'T SPAM, PEOPLE!

Boolean logic is things like AND, OR, XOR, NOR, etc; kinda like for search engines. I believe it originated in basic electronic logic?
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 20 years ago2003-11-07 18:27:23 UTC Post #4199
Halflife has VERY limited boolean logic, usually ON or OFF. Don't expect any proper programming if/then/else logic as halflife (and hl2's from what I know) entity system wasn't designed to do anything.
Posted 20 years ago2003-11-07 19:05:04 UTC Post #4204
...XOR?NOR?
Posted 20 years ago2003-11-07 19:15:50 UTC Post #4207
:nuts: yep
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 20 years ago2003-11-07 19:18:09 UTC Post #4208
queer.
Posted 20 years ago2003-11-08 01:20:49 UTC Post #4225
Ahh... Amstrad and Spectrum... Boolean system... If, then, else, or... Logic operators... These were good times (sorry for this little spam but I feel nostalgic).
Posted 20 years ago2003-11-08 03:05:01 UTC Post #4228
Well, they're still around!

I reckon you could make more complicated logic using multi_managers and multisources. That's pretty much how it is in real life, remember :cool:.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 20 years ago2003-11-08 06:02:18 UTC Post #4229
NOR - If all false YES, else NO
XOR - If different YES, all other cases NO

I love logic gates, however I will again say you CANT do advanced boolean logic in halflife, despite what entities you use! Easy example, you want something to happen when a player is NOT standing in a field, there really isn't a proper way of doing that.
Posted 20 years ago2003-11-08 08:18:56 UTC Post #4237
if you don't have nothing helpfull to add don't say it

multimanagers and env_globals are the easyest to work with,
have a look around the verc collective for a tutorial
Posted 20 years ago2003-11-10 05:43:10 UTC Post #4336
I THINK I've sorted it out now... but on the other hand, as soon as you do, it seems to turn agains you... But I think: If you make anything (like a func_breakable) act on a trigger_relay (trigger set on ON) that triggers a multisource, this multisource will act as a boolean "true", i.e. "ON" after triggering the first entity(shooting the fun_breakable). Add a few trigger_relays to that multisource and you have the boolean operator AND...
OR is eaven simpler, that's of course when a couple of different triggers target the same event.
NOT might be done in a couple of ways, maybe... If a trigger_multiple triggers a trigger_relay (set to OFF) on a multisource, and this trigger_multiple is surrounded by another trigger_mutiple that through a trigger_relay sets anything back to ON, the event will always be turned OFF when you go into the area... Right?

Whatever, I won't bother yoiu with this anymore. My own problem now...
You must be logged in to post a response.