Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make Enemies disappear?
Schinki Offline
Junior Member

Posts: 2
Threads: 1
Joined: Jan 2012
Reputation: 0
#1
Make Enemies disappear?

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.
01-10-2012, 07:30 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#2
RE: Make Enemies disappear?

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);
}

The Interrogation
Chapter 1

My tutorials
(This post was last modified: 01-10-2012, 07:54 PM by Elven.)
01-10-2012, 07:54 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#3
RE: Make Enemies disappear?

(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



01-10-2012, 07:59 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#4
RE: Make Enemies disappear?

Oh right, using laptop, so I made error Tongue

The Interrogation
Chapter 1

My tutorials
01-10-2012, 08:18 PM
Find
Schinki Offline
Junior Member

Posts: 2
Threads: 1
Joined: Jan 2012
Reputation: 0
#5
RE: Make Enemies disappear?

Thank you very much guys, this helped me alot. Seems like everything is working now :)
01-10-2012, 08:34 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#6
RE: Make Enemies disappear?

Glad that I was helpful and good luck!

The Interrogation
Chapter 1

My tutorials
01-10-2012, 08:35 PM
Find




Users browsing this thread: 1 Guest(s)