+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Following Sounds E2

  1. #11
    Wirererer Masogir's Avatar
    Join Date
    Mar 2008
    Posts
    292

    Default Re: Following Sounds E2

    Quote Originally Posted by grandpapolly View Post
    I tested the code I posted above on a server. It worked. I went back to that same server and am trying to get a code for this to work. But I can't seem to do it. So the server has the same wiremod svn settings, etc. It does support E:soundPlay().
    I posted how to do in my above post.

    This one will start playing soon as you spawn the chip:
    Code:
    @name Something
    if(first()) {owner():soundPlay(0,0,"Sound File")}
    This one will start playing when you move, and stop playing when you stop moving.
    Code:
    @name Something
    @persist P
    
    interval(1)
    
    P = sign(owner():vel():length())
    
    if(P&$P)  {owner():soundPlay(0,0,"Sound File")}
    if(!P&$P) {soundPurge()}

  2. #12
    Wirererer pl0x's Avatar
    Join Date
    Aug 2008
    Posts
    238

    Default Re: Following Sounds E2

    interval(1) doesn't do anything any faster than interval(10) and just use runOnTick(1) and you don't really even need that, make it update every 100, so do interval(100) you won't notice a difference.

  3. #13
    Wirererer grandpapolly's Avatar
    Join Date
    Aug 2008
    Posts
    283

    Default Re: Following Sounds E2

    I know how to make it run when I'm not moving. I want it so that it plays wherever I am.

  4. #14
    Developer Matte's Avatar
    Join Date
    Jan 2009
    Location
    Norway
    Posts
    3,109

    Default Re: Following Sounds E2

    Just remove the soundPurge() part, I reckon.

    Code:
    @name Something
    @persist P
    
    interval(1)
    
    P = sign(owner():vel():length())
    
    if(P&$P)  {owner():soundPlay(0,0,"Sound File")}
    if(owner():lastSaid():lower()=="off") {soundPurge()}
    "If anybody says he can think about quantum physics without getting giddy, that only shows he has not understood the first thing about them."
    -- Niels Bohr

+ Reply to Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. I'm sorry if it sounds nuby
    By wicked202 in forum Installation and Malfunctions Support
    Replies: 13
    Last Post: 03-06-2009, 03:01 PM
  2. Sounds - Expression 2
    By ZeikJT in forum Wiremod Addons & Coding
    Replies: 24
    Last Post: 02-05-2009, 11:57 PM
  3. I need more wire sounds.
    By jorge in forum Installation and Malfunctions Support
    Replies: 2
    Last Post: 03-12-2008, 06:33 PM
  4. HL2 Windows sounds
    By ace1313 in forum Off-Topic
    Replies: 4
    Last Post: 07-14-2007, 04:37 AM
  5. sounds
    By red11392 in forum Wiremod General Chat
    Replies: 4
    Last Post: 07-10-2007, 07:52 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots