02-02-2012, 09:23 AM
Hey,
I copied the script to make the enemy as a hallucination but when in game it doesn't vanish it stays in its active state. Can Someone tell me whats wrong with the script?
{
AddEntityCollideCallback("Player", "roomonemonsterspawn", "SetEntityActive", true, 1);
}
void SetEntityActive(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("roomonegrunt", true);
SetEnemyIsHallucination("roomonegrunt", true);
PlaySoundAtEntity("", "scare_male_terrified.snt", "Player", 0, false);
}
but i also in the level editor set the enemy to hallucination and enddistance 1 but i want it to disappear when its right near you so what number do i put for that.
and in SetEnemyIsHallucination("roomonegrunt", true); what does the true do?
I copied the script to make the enemy as a hallucination but when in game it doesn't vanish it stays in its active state. Can Someone tell me whats wrong with the script?
{
AddEntityCollideCallback("Player", "roomonemonsterspawn", "SetEntityActive", true, 1);
}
void SetEntityActive(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("roomonegrunt", true);
SetEnemyIsHallucination("roomonegrunt", true);
PlaySoundAtEntity("", "scare_male_terrified.snt", "Player", 0, false);
}
but i also in the level editor set the enemy to hallucination and enddistance 1 but i want it to disappear when its right near you so what number do i put for that.
and in SetEnemyIsHallucination("roomonegrunt", true); what does the true do?