Make a disco boat

Discussion in 'Mapping Questions & Discussion' started by zenarium, Jul 28, 2012.

  1. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    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...
     
  2. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    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
     
  3. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    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
     
  4. Idolon

    aa Idolon the worst admin

    Messages:
    1,421
    Positive Ratings:
    4,154
    Parent the button to the boat, then they will move together.
     
  5. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    2
    How do I parent them?
     
  6. Idolon

    aa Idolon the worst admin

    Messages:
    1,421
    Positive Ratings:
    4,154
    From the VDC:
    "Parent <targetname>
    Specifies a movement parent. An entity will maintain its initial offset from its parent."

    Most entities will have this.
     
  7. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    2
    Sorry, I still don't understand :S
     
  8. Idolon

    aa Idolon the worst admin

    Messages:
    1,421
    Positive Ratings:
    4,154
    [​IMG]
    Set this value to another object's name, and it will stay relative to that object.
     
  9. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    2
    I can't do that between the ambient_generic and the button... only between the button and the boat.
     
  10. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    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?
     
  11. EArkham

    aa EArkham Necromancer

    Messages:
    1,555
    Positive Ratings:
    2,157
    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.
     
  12. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    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.
     
  13. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    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)
     
  14. EArkham

    aa EArkham Necromancer

    Messages:
    1,555
    Positive Ratings:
    2,157
    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.
     
  15. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    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.