Frictional Games Forum (read-only)
Problems - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Problems (/thread-10756.html)



Problems - jmayo - 10-15-2011

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]


RE: Problems - Kyle - 10-15-2011

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



RE: Problems - jmayo - 10-15-2011

Didnt Work


RE: Problems - Kyle - 10-15-2011

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()
{
}



RE: Problems - schmupper - 10-15-2011

(10-15-2011, 12:35 AM)jmayo Wrote: Didnt Work
Same error? Post the log.