Frictional Games Forum (read-only)

Full Version: Make Enemies disappear?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello guys, first of all: I'm sorry if my English is bad Big Grin

I just started to create my first little Custom Story and I have already looked up for a script to spawn an enemy if you step on a script area. Now I want to go back, let the enemy step on another script area and make him disappear. Right now it looks like this:
"void OnStart()
{
AddEntityCollideCallback("Player" , "Schreck" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Monster1" , true);
}"

Could anyone please complete this script for me? I would be very thankful.
void OnStart()
{
AddEntityCollideCallback("Player" , "Schreck" , "MonsterFunc1" , true , 1);
AddEntityCollideCallback("
Monster1" , "*another script area name*" , "MonsterFunc3" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Monster1" , true);
}
void MonsterFunc2(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Monster1" , false);
}
(01-10-2012, 07:54 PM)Elven Wrote: [ -> ]
void OnStart()
{
AddEntityCollideCallback("Player" , "Schreck" , "MonsterFunc1" , true , 1);
AddEntityCollideCallback("
Monster1" , "*another script area name*" , "MonsterFunc3" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Monster1" , true);
}
void MonsterFunc2(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("Monster1" , false);
}
AddEntityCollideCallback("Monster1" , "*another script area name*" , "MonsterFunc2" , true , 1);

Wink


Oh right, using laptop, so I made error Tongue
Thank you very much guys, this helped me alot. Seems like everything is working now :)
Glad that I was helpful and good luck!