Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Restart custom music after respawn?
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#2
RE: Restart custom music after respawn?

(06-17-2013, 12:23 AM)serbusfish Wrote: In several sections of my CS I use alternative music to replace regular monster music. However ive found that if you die and respawn the music stops and the normal music plays. Is there a way to make my custom music restart playing after you die?

void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);

Sets a checkpoint at which the player will respawn in case he dies.
Callback syntax: void MyFunc(string &in asName, int alCount)
Count is 0 on the first checkpoint load!

asName - the internal name
asStartPos - the name of the StartPos in the editor
asCallback - the function to call when the player dies/respawns
asDeathHintCat - the category of the death hint message to be used in the .lang file
asDeathHintEntry - the entry in the .lang file

Using this CheckPoint function, you can define a function that will be called when the player respawns (check the asCallback line)
Theoretically you should be able to use 'PlayMusic' in the callback function to start playing music of your choice when they respawn, but it almost certainly won't be a seamless transition for the music playing before you die, then after you respawn. You'll have to try it and find out

06-17-2013, 02:37 PM
Find


Messages In This Thread
RE: Restart custom music after respawn? - by Adrianis - 06-17-2013, 02:37 PM



Users browsing this thread: 1 Guest(s)