Announcement

Collapse
No announcement yet.

i need help in QC file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • i need help in QC file

    how a can put background music in quake?
    tnx!

    PD: in more hours i put the qtest mod final version with the SRC :d

  • #2
    You can't without it sounding wrong (it will be spatialized except in darkplaces). If that doesn't bother you, use a sound editing program to get the length of your music, then create an entity like this:

    Code:
    void() spawnmusic = 
    {
    	local entity e;
    	
    	e = spawn();
    	e.think = playmusic;
    	e.nextthink = time + 1.0;
    };
    then call spawnmusic in worldspawn in world.qc.

    playmusic should look something like this:

    Code:
    void() playmusic =
    {
    	sound(self, CHAN_AUTO, "[path to your music file]", 1.0, ATTN_NONE);
    	self.nextthink = time + [length of your music file];
    };

    Comment


    • #3
      i understand you reply but tnx for you help
      i found a qc in mod kickflip quake this reproduce a random music but i compile with my mod and no error :d
      but in the game i can hear the music

      Comment

      Working...
      X