J.A.C.K.

J.A.C.K.

View Stats:
can't get button to play audio
the ambient audio plays on its own, but does not react to the button it is paired with. there is an output and input tab for object properties in hammer, but not for jack. what do i do in place of what would go in those tabs?
Originally posted by tetoforever:
The IO system only exists in Source, in Quake (and Half-Life) targets are used instead.
See:
https://twhl.info/wiki/page/Vlatitude%3A_An_Introduction_to_Triggers
https://twhl.info/wiki/page/VERC%3A_Concepts%3A_Triggers_and_Targets

In short, give the ambient_generic entity a name, and then put that name into the "target" field for whatever entity triggers it (func_button, trigger_once, etc)
Also make sure the spawn flag "Start Silent" is enabled for the ambient_generic entity, or it will play when the map starts.
< >
Showing 1-6 of 6 comments
The author of this thread has indicated that this post answers the original topic.
The IO system only exists in Source, in Quake (and Half-Life) targets are used instead.
See:
https://twhl.info/wiki/page/Vlatitude%3A_An_Introduction_to_Triggers
https://twhl.info/wiki/page/VERC%3A_Concepts%3A_Triggers_and_Targets

In short, give the ambient_generic entity a name, and then put that name into the "target" field for whatever entity triggers it (func_button, trigger_once, etc)
Also make sure the spawn flag "Start Silent" is enabled for the ambient_generic entity, or it will play when the map starts.
Originally posted by Jessica:
The IO system only exists in Source, in Quake (and Half-Life) targets are used instead.
See:
https://twhl.info/wiki/page/Vlatitude%3A_An_Introduction_to_Triggers
https://twhl.info/wiki/page/VERC%3A_Concepts%3A_Triggers_and_Targets

In short, give the ambient_generic entity a name, and then put that name into the "target" field for whatever entity triggers it (func_button, trigger_once, etc)
Also make sure the spawn flag "Start Silent" is enabled for the ambient_generic entity, or it will play when the map starts.

i've tried that. i let the audio play on map start just to make sure it wasn't a problem with the wav file or the entity, but despite the button having the target set to the ambient's name, the audio has no reaction to the button being pressed.

i've done everything you would in hammer up until the point you need to configure the output tab for the button (where you would define "OnPressed" as activating the (name of the entity) via PlaySound), which jack seems to lack. i'm not sure if there's a way to reveal those tabs or if they streamlined the process in some way i haven't figured out yet, but the ambient entity only wants to play when the start silent flag is unchecked.
even if those tabs are unique to source, i'm not sure how else to go about getting it to work since there doesn't seem to be anything else left to do
If the sound only plays once on trigger (i.e. doesn't replay forever, like an alarm sound) also make sure "Not Toggled" (may also be called "Is NOT Looped" or other variations that mean the same thing) is also set.

If you still can't get it working, here is an example map of exactly what you need to do.
https://pastebin.com/62PMt9SU
(click download and save it as a .map file if you get a chance to (it'll default to being a .c file, change it to .map), or rename it to be .map afterwards, when you go to File > Open... in J.A.C.K. set the file type to "All supported formats" or "Quake MAP" so it shows up)


Additional technical details:
Those tabs expose a part of the map format that only exists in Source engine games. Half-Life is not on the Source engine, nor does J.A.C.K. support the Source engine, so those tabs do not exist nor does the IO system which the tabs allow you to control (and they wouldn't actually do anything in-engine if they did).


In Half-Life, you can only "use" an entity. If you wanted to think of it as the IO system, this is the one and only input you can use. Every entity has their own idea of what being "used" means: for doors, this means to open or close. For sounds, this means to start or stop playing. For env_explosion entities, it means to explode.

When an entity is used, it will (usually) also use whatever entity is in its "target" field. When you use a button, it looks for the entity named in the "target" field and then uses that, also doing whatever action that entity does when used. Having the name of the sound entity as a target of a func_button is the direct equivalent of "func_button -> OnPressed -> sound".
i have made the stunning discovery that some mystery attribute in the button's properties break the button's functionality when given a certain value, although i'm not sure which. it worked as intended when i only changed the target and left everything else alone.

in source, i have done what i did with this button in goldsrc (with the addition of the input/output options), so i figured copying that to the best of my ability or until i couldn't go any further would have worked (roughly about how this page instructs you for hammer: https://developer.valvesoftware.com/wiki/TF2/Creating_Audio_Playing_Buttons)

one of the extra quality-of-life/optional attributes for func_button in source breaks the func_button in goldsrc when imitated (or a combination of several).

thank you for taking the time to reply. i had just genetically engineered a button by mistake.
i'll mark your first response as the answer in case somebody is looking for the tutorial
< >
Showing 1-6 of 6 comments
Per page: 1530 50