Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How Can I Make A Ghost Enemies??
Author Message
Jayvee17 Offline
Junior Member

Posts: 25
Joined: May 2011
Reputation: 0
Post: #1
How Can I Make A Ghost Enemies??
Can someone help me on how to make a ghost enemy?? example:after getting a key or an item a shadow or enemy will spawn somewhere you locate it...or a slimes??
05-30-2011 03:14 PM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 910
Joined: Sep 2010
Reputation: 7
Post: #2
RE: How Can I Make A Ghost Enemies??
SetEnemyActive("MonsterName", true);

You have to place the monster in the game, then, when selected, uncheck the box "Active", then go to it's properties and then check the box "Hallucination", but I don't know what it's called exactly. Then it should work once you insert that script command in the correct function related to a SetEntityPlayerInteractCallback with the item.

05-30-2011 03:21 PM
Find all posts by this user Quote this message in a reply
Jayvee17 Offline
Junior Member

Posts: 25
Joined: May 2011
Reputation: 0
Post: #3
RE: How Can I Make A Ghost Enemies??
Could You Send Me The Codes Please??...
05-30-2011 04:35 PM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 910
Joined: Sep 2010
Reputation: 7
Post: #4
RE: How Can I Make A Ghost Enemies??
I'll try. The key that is interacted with is "Key01" and you could change it to match the key name in the editor. The monster's name is "MonsterName" and you could change it to match the monster's name in the editor.

void OnStart()
{
     SetEntityPlayerInteractCallback("Key01", "Func01", true);
}
void Func01(string &in asEntity)
{
     SetEntityActive("MonsterName", true);
}

05-30-2011 04:56 PM
Find all posts by this user Quote this message in a reply
Jayvee17 Offline
Junior Member

Posts: 25
Joined: May 2011
Reputation: 0
Post: #5
RE: How Can I Make A Ghost Enemies??
(05-30-2011 04:56 PM)Kyle Wrote:  I'll try. The key that is interacted with is "Key01" and you could change it to match the key name in the editor. The monster's name is "MonsterName" and you could change it to match the monster's name in the editor.

void OnStart()
{
     SetEntityPlayerInteractCallback("Key01", "Func01", true);
}
void Func01(string &in asEntity)
{
     SetEntityActive("MonsterName", true);
}

Ok Thanks Dude..!!
One More Thing...What If When I get The Key... An Enemy Will Spawn Permanently And Not Like A Shadow...And how does the shadow gone after you saw him??Example: When you open a door and you turn around and you will see him and he will gone like a bubbles...??
(This post was last modified: 05-30-2011 05:17 PM by Jayvee17.)
05-30-2011 05:03 PM
Find all posts by this user Quote this message in a reply
Nye Offline
Senior Member

Posts: 251
Joined: Jan 2011
Reputation: 2
Post: #6
RE: How Can I Make A Ghost Enemies??
(05-30-2011 05:03 PM)Jayvee17 Wrote:  
(05-30-2011 04:56 PM)Kyle Wrote:  I'll try. The key that is interacted with is "Key01" and you could change it to match the key name in the editor. The monster's name is "MonsterName" and you could change it to match the monster's name in the editor.

void OnStart()
{
     SetEntityPlayerInteractCallback("Key01", "Func01", true);
}
void Func01(string &in asEntity)
{
     SetEntityActive("MonsterName", true);
}

Ok Thanks Dude..!!
One More Thing...What If When I get The Key... An Enemy Will Spawn Permanently And Not Like A Shadow...And how does the shadow gone after you saw him??Example: When you open a door and you turn around and you will see him and he will gone like a bubbles...??

As fail as those two sentences were, you will need to use a timer, to despawn the enemy X seconds after he is spawned/upon 'playerlookatcallback'.

05-30-2011 08:11 PM
Find all posts by this user Quote this message in a reply
Kyle Offline
Posting Freak

Posts: 910
Joined: Sep 2010
Reputation: 7
Post: #7
RE: How Can I Make A Ghost Enemies??
Or you could just not check the Hallucination box and then give it path nodes and so when it reaches that last path node, it despawns and become inactive.

05-30-2011 10:23 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)