Hello, Abihishi,
I see you're making progress. I would divide your question into multiple sub-questions.
- Calling a function OnPickUp
- Hinting The Enemy
- (optional) Enemy Path Nodes
From your question I understand that you want the monster to be a hallucination.
You achieve that in Level Editor, by selecting the enemy and checking the Hallucination CheckBox. Keep in mind that the value under it represents the distance at which the monster disappears.
- Calling a function OnPickUp
This is a function specified on the
Dev Wiki as:
SetEntityPlayerInteractCallback("NameOfEntity", "FunctionToCall", true);
You put that command usually in OnStart() function.
The new function would then be:
void FunctionToCall(string &in asEntity)
{
}
or you could use the Callback for an entity:
SetEntityCallbackFunc("NameOfEntity", "FunctionToCall");
You put that command usually in OnStart() function.
void FunctionToCall(string &in asEntity, string &in type)
{
}
A simple command like:
ShowEnemyPlayerPosition("NameOfEnemy");
Makes the enemy charge towards the player even if it doesn't see him.
You put that into the FuctionToCall of your choice.
- (optional) Enemy Path Nodes
If the enemy has trouble getting through your level, try searching for Enemy Path Nodes on Wiki or on Google, it might help you out.
There's even a great
video by Mudbill.