Frictional Games Forum (read-only)

Full Version: Error!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What's wrong?

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Area", "Aparecemonstruo", true, 0);
AddUseItemCallback("abrirpuerta", "Llave", "Puerta", "Abrirpuerta", true);
AddEntityCollideCallback("Player", "Dani", "Aparecemonstruoagua", true, 0);
}

void Aparecemonstruo(string &in asParent, string &in asChild, int alState)
void Aparecemonstruoagua(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("enemigo", true);
SetEntityActive("enemigoagua", true);
ShowEnemyPlayerPosition("enemigo");
}

////////////////////////////
// Run when entering map
void OnEnter()
{


}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

void Abrirpuerta(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Puerta", false, true);
}
void Aparecemonstruo(string &in asParent, string &in asChild, int alState)
void Aparecemonstruoagua(string &in asParent, string &in asChild, int alState)

{

SetEntityActive("enemigo", true);

SetEntityActive("enemigoagua", true);

ShowEnemyPlayerPosition("enemigo");

}
THANKS!!! But... the function "Aparecemonstruo" dissapear??
The function didn't do anything. It has to have Brackets {} and functions inside.

void Aparecemonstruo(string &in asParent, string &in asChild, int alState)
{
PUT FUNCTIONS IN HERE
For example
GiveSanityBoostSmall();
}
Like that?

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Area", "Aparecemonstruo", true, 0);
AddUseItemCallback("abrirpuerta", "Llave", "Puerta", "Abrirpuerta", true);
AddEntityCollideCallback("Player", "Dani", "Aparecemonstruoagua", true, 0);
}
void Aparecemonstruo(string &in asParent, string &in asChild, int alState)
{
void Aparecemonstruoagua(string &in asParent, string &in asChild, int alState)
}

SetEntityActive("enemigo", true);

SetEntityActive("enemigoagua", true);

ShowEnemyPlayerPosition("enemigo");

}

////////////////////////////
// Run when entering map
void OnEnter()
{


}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

void Abrirpuerta(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Puerta", false, true);
}
no more like this:

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Area", "Aparecemonstruo", true, 0);
AddUseItemCallback("abrirpuerta", "Llave", "Puerta", "Abrirpuerta", true);
AddEntityCollideCallback("Player", "Dani", "Aparecemonstruoagua", true, 0);
}

void Aparecemonstruo(string &in asParent, string &in asChild, int alState)
{
PUT STUFF YOU WANT TO HAPPEN IN HERE
}

void Aparecemonstruoagua(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("enemigo", true);
SetEntityActive("enemigoagua", true);
ShowEnemyPlayerPosition("enemigo");
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

void Abrirpuerta(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Puerta", false, true);
}