Func_Button Never Works (HL1) Created 1 year ago2022-10-01 13:13:40 UTC by Wibble Wibble

Created 1 year ago2022-10-01 13:13:40 UTC by Wibble Wibble

Posted 1 year ago2022-10-01 13:13:40 UTC Post #346912
So I am new to Half-Life 1 mapping but reasonably experienced with Half-Life 2 mapping. Func_Button will not work no matter what I seem to do. Button_Target works fine but its obviously not what you're supposed to use and it lacks features. I have tried Func_Button in the map I'm making and separate test environments and neither will work. Func_Button will not work with doors, trains, different textures or anything. I have followed multiple tutorials and googled the hell out of the problem and nobody seems to have this issue.

What I'm doing:
1. Create door and give it a name. No flags.
2. Create button and set target to name of door. No flags.
DoorDoor
ButtonButton
Apparently this should work but it doesn't. Just for the record there no leaks in the map or anything. Maybe its me being incredibly stupid but I don't know.

Compile Log: https://pastebin.com/bYsRcQCe

I am using:
JACK editor 1.1.1064 (64-bit)
Zoner's Half-Life Tools Compiler
Jed's HLMV
Half-Life (Steam)

Help me TWHL you are my only hope
Wibble WibbleThe true citizen enjoys Half-Life but uses discretion
Posted 1 year ago2022-10-01 14:09:23 UTC Post #346913
Make sure the door has a speed value high than 0. If it's 0, the door won't move.
If it does have a speed value, make sure the lip value isn't the same as the speed value. Values above 0 but bellow, let's say, 5 or 6 are good values for lip. The wiki says: The lip value is the number of units left after move (the lip value is subtracted from the move distance).

If you set the Don't Move flag on the button, the button won't move.

Some unrelated thingies:
Avoid using Jed's HLMV, it's old and buggy. Use Half-Life Asset Manager by Solokiller instead.

Judging from the compile log you posted, you seem to be running HLVIS twice, and HLRAD is skipped.
The Mad Carrot The Mad CarrotMad Carrot
Posted 1 year ago2022-10-01 14:24:45 UTC Post #346914
Door has the default speed value of 100 and I know what lip is, changing it makes no difference. Door still doesn't work and button can't be interacted with. Changing flags on both the door and the button makes no difference either.

I've switched out Jed's HLMV for Half-Life Asset Manager, thanks for the recommendation.

I had HLVIS running twice for some reason, corrected that now so that HLRAD runs like its supposed too.
Wibble WibbleThe true citizen enjoys Half-Life but uses discretion
Posted 1 year ago2022-10-01 15:02:10 UTC Post #346916
Would you mind posting the jmf?
The Mad Carrot The Mad CarrotMad Carrot
Posted 1 year ago2022-10-01 15:18:06 UTC Post #346917
Wibble WibbleThe true citizen enjoys Half-Life but uses discretion
Posted 1 year ago2022-10-01 15:41:54 UTC Post #346918
Ok, I found the problem. You somehow gave the button a Health (shootable if > 0) value, which was at 1. So with a health value of 1 or higher, the button can't be used by 'use-keying' it but instead will activate if shot at. Cheat in some weapons and see for yourself. Set the health value to 0 should make the button usable again.
The Mad Carrot The Mad CarrotMad Carrot
Posted 1 year ago2022-10-01 18:29:48 UTC Post #346919
Sometimes when an existing entity is changed to another type, the parameters will remain. That can be annoying.
Posted 1 year ago2022-10-01 18:49:15 UTC Post #346920
Ok, I found the problem. You somehow gave the button a Health (shootable if > 0) value, which was at 1. So with a health value of 1 or higher, the button can't be used by 'use-keying' it but instead will activate if shot at. Cheat in some weapons and see for yourself. Set the health value to 0 should make the button usable again.
Yep that fixed it. Some how it was set to 1 by default and I never knew that would prevent a button from working. Thanks for the help you've saved me from using Button_Target until the end of time.
Wibble WibbleThe true citizen enjoys Half-Life but uses discretion
Posted 1 year ago2022-10-01 19:35:13 UTC Post #346921
I don't think 1 is the default value for the health property, should be 0, however, as Bruce pointed out, changing from one entity to another causes the properties from the first entity to carry over to the second entity, including values. This is a bug with Jack. If you have func_detail set as the default entity, the first time you create an entity out of brushes, it'll be func_detail and from there you can change to the entity you want. Func_detail properties don't carry over.
The Mad Carrot The Mad CarrotMad Carrot
Posted 1 year ago2022-10-03 20:14:35 UTC Post #346930
What happens here is that when you type "func_button" in the entity properties' Class field, you start with "f", and Jack then automatically selects the first entity type whose name starts with "f" - which is likely func_breakable. That's where the default health of 1 comes from. This accumulation of unwanted keys and values (properties) only seems to happen when you change the class of an entity by typing in a new classname. If you select a new classname via the dropdown box, then keys from the previous type are removed (unless you modified their value).

You can also create entities of a specific type by right-clicking on a selected brush(es) in any of the 2D/3D views. Selecting the 'Tie to entity' option in the context menu then lets you choose from all available brush entity types.
You must be logged in to post a response.