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 Music don't start in script
MaksoPL Offline
Member

Posts: 51
Threads: 26
Joined: Mar 2014
Reputation: 0
#1
Music don't start in script

I've maked script to play music in area, and it's don't work.
Callback: AddEntityCollideCallback("Player","grunt_music","Monster1_Music",false,1);
Void: void Monster1_Music(string &in asParent, string &in asChild, int alState)
{
PlayMusic("12_event_blood",true,1,01,1.0,true);
}
What's wrong?
02-15-2015, 12:44 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Music don't start in script

PlayMusic("12_event_blood",true,1,01,1.0,true);

Use dots, not commas.

"Veni, vidi, vici."
"I came, I saw, I conquered."
02-15-2015, 02:32 PM
Find
MrBehemoth Offline
Senior Member

Posts: 408
Threads: 19
Joined: Feb 2014
Reputation: 40
#3
RE: Music don't start in script

That's not exactly the problem.

MaksoPL, check the values you're using and the order you're using them in.

Remember, a float is a real number with a decimal fraction, and it always has a point (.) and ends in f. An int (integer) is a whole number with no fraction. E.g.:

float a = 1.0f;
float b = -0.5f;
float c =  3.1415926535f;

int x = 1;
int y = 0;
int z = -999;

void PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);

I think your line of code should probably be this:

PlayMusic("12_event_blood", true, 1.0f, 1.0f, 1, true);

02-18-2015, 11:25 PM
Find




Users browsing this thread: 1 Guest(s)