Frictional Games Forum (read-only)

Full Version: Problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I Will Be Posting Script Problems here From now On
Here is My First One:
Script

////////////////////////////
// Run when entering map
void OnEnter()
////////////////////////////+
// Run first time starting map
void OnStart()

{
AddEntityCollideCallback("Player", "shadow", "shadowappear", true, 1);
}

void shadowappear(string &in asParent, string &in asChild, int alState);
{
PlaySoundAtEntity("guardian_activated1", "guardian_activated", "player", 5, true);
void SetEntityActive("slime_pile_2", true);
void SetEntityActive("slime_pile_large_1", true);
void SetEntityActive("slime_anim_wall_2", true);
void SetEntityActive("slime_egg_1, true");
void SetEntityActive("slime_anim_ceiling_1", true);
}


Error


[Image: helplz.png]
I see multiple errors.

Code:
void OnEnter()
{
}
void OnStart()
{
     AddEntityCollideCallback("Player", "shadow", "shadowappear", true, 1);
}
void shadowappear(string &in asParent, string &in asChild, int alState)
{
     PlaySoundAtEntity("guardian_activated1", "guardian_activated.snt", "Player", 5, true);
     SetEntityActive("slime_pile_2", true);
     SetEntityActive("slime_pile_large_1", true);
     SetEntityActive("slime_anim_wall_2", true);
     SetEntityActive("slime_egg_1", true);
     SetEntityActive("slime_anim_ceiling_1", true);
}

You can try this. You can also notice that I removed the "void" at the beginning for some of the command functions. You don't need those.

I hope it works. Smile
Didnt Work
Try rearranging it like this:

Code:
void OnStart()
{
     AddEntityCollideCallback("Player", "shadow", "shadowappear", true, 1);
}
void shadowappear(string &in asParent, string &in asChild, int alState)
{
     PlaySoundAtEntity("guardian_activated1", "guardian_activated.snt", "Player", 5, true);
     SetEntityActive("slime_pile_2", true);
     SetEntityActive("slime_pile_large_1", true);
     SetEntityActive("slime_anim_wall_2", true);
     SetEntityActive("slime_egg_1", true);
     SetEntityActive("slime_anim_ceiling_1", true);
}
void OnEnter()
{
}
(10-15-2011, 12:35 AM)jmayo Wrote: [ -> ]Didnt Work
Same error? Post the log.