Frictional Games Forum (read-only)
How Can I Make A Ghost Enemies?? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: How Can I Make A Ghost Enemies?? (/thread-8343.html)



How Can I Make A Ghost Enemies?? - Jayvee17 - 05-30-2011

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??


RE: How Can I Make A Ghost Enemies?? - Kyle - 05-30-2011

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.


RE: How Can I Make A Ghost Enemies?? - Jayvee17 - 05-30-2011

Could You Send Me The Codes Please??...


RE: How Can I Make A Ghost Enemies?? - Kyle - 05-30-2011

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.

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



RE: How Can I Make A Ghost Enemies?? - Jayvee17 - 05-30-2011

(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.

Code:
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...??


RE: How Can I Make A Ghost Enemies?? - Nye - 05-30-2011

(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.

Code:
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'.




RE: How Can I Make A Ghost Enemies?? - Kyle - 05-30-2011

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.