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
#9
RE: Activate Monster When I Pick Key

The command you chose refers to a Function that you will need to create.
PHP Code: (Select All)
SetEntityCallbackFunc("servant_grunt_1""key0"); 
In plain words you are saying:
If player touches servant_grunt_1, then run key0 function.
That's not what you want.

The script you most likely want is:
PHP Code: (Select All)
void OnStart()
{
    
SetEntityCallbackFunc("NameOfEntity""MonsterAppearanceFunc"); //NameOfEntity = Name of the key
}

void MonsterAppearanceFunc(string &in asEntitystring &in type//The name of this function was in the callback earlier
{
    
SetEntityActive("NameOfEnemy"true); //Remember to change NameOfEnemy
    
ShowEnemyPlayerPosition("NameOfEnemy"); //Remember to change NameOfEnemy


If you have no idea what you're supposed to change to what, you can use the
I don't know what I'm supposed to change version:
Spoiler below!

PHP Code: (Select All)
string EnemyName "Servant_grunt_1"//Change this to your monster's name;¨
string ItemName "key_0"//Change this to your key's name;

void OnStart()
{
    
SetEntityCallbackFunc(ItemName"MonsterAppearanceFunc");
}

void MonsterAppearanceFunc(string &in asEntitystring &in type)
{
    
SetEntityActive(EnemyNametrue);
    
ShowEnemyPlayerPosition(EnemyName);


(This post was last modified: 02-22-2016, 05:23 PM by Spelos.)
02-22-2016, 04:46 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: 3 Guest(s)