Frictional Games Forum (read-only)

Full Version: Wrong script!Why!?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
My scripting file:

void OnStart()
{
PlayMusic("01_amb_darkness.ogg", true, 0.7f, 1, 0, false);
}

void OnEnter()
{
AddEntityCollideCallback("Player", "scare_1", "scare1", true, 1);
PlayMusic("01_amb_darkness.ogg", true, 0.7f, 1, 0, false);

}

void scare1(string &in asParent , string &in asChild , int alState)
{
PlaySoundAtEntity("", "04_hole_squeal.snt", "candlestick_floor_1", 0, false);
you forgot } on the end.

Might be helpfull if you also post the error report you are getting.
(01-05-2011, 10:59 AM)ModManDann Wrote: [ -> ]you forgot } on the end.

Might be helpfull if you also post the error report you are getting.

also he's not using this correctly;
void scare1(string &in asParent , string &in asChild , int alState)

should be something like
void scare1(string &in asParent)

I'm not in the mood to look up the proper use and syntax
Okay Thanks! Smile
But whats wrong with that?:
}

void guardian1(string &in asParent , string &in asChild , int alState)
{
PlaySoundAtEntity("", "guardian_distant3.snt", "storage_box_wood02_1", 0, false);
}
Huh

void OnStart()
{
PlayMusic("01_amb_darkness.ogg", true, 0.7f, 1, 0, false);
}

void OnEnter()
{
AddEntityCollideCallback("Player", "scare_1", "scare1", true, 1);
PlayMusic("01_amb_darkness.ogg", true, 0.7f, 1, 0, false);
AddEntityCollideCallback("player", "guardian_1", "guardian1", true, 1);
}

void scare1(string &in asParent , string &in asChild , int alState)
{
PlaySoundAtEntity("", "04_break02.snt", "candlestick_floor_1", 0, false);
PlaySoundAtEntity("", "scare_male_terrified_4.snt", "candlestick_floor_1", 0, false);
}

void guardian1(string &in asParent , string &in asChild , int alState)
{
PlaySoundAtEntity("", "guardian_distant.snt", "Player", 0, false);
PlaySoundAtEntity("", "guardian_idle.snt", "Player", 0, false);
Don't make a new thread for the same thing, use your old thread.

you are missing a } at the end again.
void OnStart()
{
AddEntityCollideCallback("Player", "scare_1", "scare1", true, 1);
AddEntityCollideCallback("Player", "guardian_1", "guardian1", true, 1);
}

void OnEnter()
{
PlayMusic("01_amb_darkness.ogg", true, 0.7f, 1, 0, false);
}

void scare1(string &in asParent , string &in asChild , int alState)
{
AddDebugMessage("scare1", false);
PlaySoundAtEntity("scaresound1", "04_break02.snt", "candlestick_floor_1", 0, false);
PlaySoundAtEntity("scaresound2", "scare_male_terrified.snt", "candlestick_floor_1", 0, false);
}

void guardian1(string &in asParent , string &in asChild , int alState)
{
AddDebugMessage("guardian1", false);
PlaySoundAtEntity("guardiansound1", "guardian_distant.snt", "Player", 0, false);
PlaySoundAtEntity("guardiansound2", "guardian_idle.snt", "Player", 0, false);
}



There. That should work.
@Jens : okay sorry Big Grin
@Mofo:Thanks man!
And yes right!Thanks.
I`ve tried a new map.
void OnStart()
{
AddEntityCollideCallback("Player", "area_scare_1", "areascare1", true, 1);
PlayMusic("12_amb.ogg"), true, 0.7f, 1, 0, false);
}

void OnEnter()
{
PlayMusic("12_amb.ogg"), true, 0.7f, 1, 0, false);
}

void areascare1(string &in asParent , string &in asChild , int alState)
{
PlaySoundAtEntity("Player", "04_hole_squeal.snt", "candle_floor_1", 0, false);
}

Are there any mistakes!?
You should also post the error message you're getting.
I'm not sure what's wrong right now so yeah...
Pages: 1 2 3 4