Make a disco boat

  • If you're asking a question make sure to set the thread type to be a question!

zenarium

L2: Junior Member
Jun 29, 2012
82
2
I want to make a boat with a disco but I have a problem... How do I select two functions in the disco buttons that play music= Because I need the boat function and the button function...
 
T

The Asylum

you need two func_buttons and two ambient_generics. check the damage box in the button's flags tab

func_button
OnDamaged
(your first ambient_generic)
PlaySound

Do the same for the other one

Make sure that the ambient_generic's sound file points to the sound you want it to play ( ie tf/sound/folder/yourmusic.mp3)

Remember to send your ambient_generic a StopSound input sometime, or the sound won't play again.

Also it's best to have your sound files as .mp3. There's a program called Audacity that can convert .wav into .mp3 if you need to
 

zenarium

L2: Junior Member
Jun 29, 2012
82
2
I have the disco already... the problem is that when I want to put the boat moving the button function disappear because there is a new function.

I
 

Idolon

they/them
aa
Feb 7, 2008
2,105
6,106
From the VDC:
"Parent <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent."

Most entities will have this.
 

Idolon

they/them
aa
Feb 7, 2008
2,105
6,106
parent.png

Set this value to another object's name, and it will stay relative to that object.
 

zenarium

L2: Junior Member
Jun 29, 2012
82
2
I can't do that between the ambient_generic and the button... only between the button and the boat.
 

zenarium

L2: Junior Member
Jun 29, 2012
82
2
I have now all the buttons keeping their fuction and following the boat. But now I have the same problem with the generic_ambient. I activate the music but it stays behind xD

How do I solve this new problem?
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
On the ambient_generic, there should be a field that says something like "entity sound source" or "entity source" (I'm going off memory). If you put in the name of your boat there, the sound should always sound like it's coming from the boat.
 

zenarium

L2: Junior Member
Jun 29, 2012
82
2
Ok, I have done it with the lights too.

But now there is one last problem... the logic_timer of the spotlights... the same problem.
 
T

The Asylum

Is all of the playable area just within or on top of the boat? If so, you can save yourself a lot of trouble if you just make the boat static, and create an illusion of movement with a scrolling texture (see also: ctf_convoy)
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
What do you mean, logic_timer has the same problem? You don't have to parent that to anything. It doesn't matter where the logic entities are; they don't work off proximity.

Also, parenting lights to a moving boat is going to make them dynamic, which is going to create a host of other problems.
 

zenarium

L2: Junior Member
Jun 29, 2012
82
2
EArkham: Thanks, I will put the logic_timer somewhere else. I already tested the lights and it works fine, they didn't move, they keep are still static.



The Asylum: The boat is just a part of the map, I can't use that trick.

Thank you all for your awsome help! I now have my boat with a disco.

My level will be online soon.