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
Activate Monster When I Pick Key
Spelos Away
Banned

Posts: 231
Threads: 19
Joined: Sep 2014
#3
RE: Activate Monster When I Pick Key

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.
[Image: QROKuRL.png]
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:

PHP Code: (Select All)
SetEntityPlayerInteractCallback("NameOfEntity""FunctionToCall"true); 
You put that command usually in OnStart() function.
The new function would then be:
PHP Code: (Select All)
void FunctionToCall(string &in asEntity)
{



or you could use the Callback for an entity:
PHP Code: (Select All)
SetEntityCallbackFunc("NameOfEntity""FunctionToCall"); 
You put that command usually in OnStart() function.

PHP Code: (Select All)
void FunctionToCall(string &in asEntitystring &in type
{


  • Hinting The Enemy

A simple command like:
PHP Code: (Select All)
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.
(This post was last modified: 02-21-2016, 06:30 PM by Spelos.)
02-21-2016, 06:24 PM
Find


Messages In This Thread
Activate Monster When I Pick Key - by Abihishi - 02-21-2016, 05:59 PM
RE: Activate Monster When I Pick Key - by WALP - 02-21-2016, 06:07 PM
RE: Activate Monster When I Pick Key - by Spelos - 02-21-2016, 06:24 PM
RE: Activate Monster When I Pick Key - by Spelos - 02-22-2016, 04:46 PM
RE: Activate Monster When I Pick Key - by Spelos - 02-22-2016, 05:23 PM
RE: Activate Monster When I Pick Key - by Spelos - 02-22-2016, 06:27 PM



Users browsing this thread: 1 Guest(s)