So I watched "ThisIsYourComputer"'s vid "Activate monster upon key pickup" on Youtube, and followed the instructions, but when I try to load up the map, this appears:
http://pastie.org/3574259
I'm guessing you'll need the script it's trying to run:
http://pastie.org/3574272
I just started learning this stuff, so I still don't know that much, sorry for any obvious mistakes...
Code:
void OnStart()
{
SetEntityPlayerInteractCallback("key_study_1", "ActivateMonster", true);
}
void ActivateMonster(string &in item)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", "0", "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", "0", "idle");
}
void OnEnter()
{
}
void OnLeave()
{
}
try this, your code wasn't anywhere. It didn't know whether to start when you leave a map, when you enter a map, or when it simply starts.
Thanks for quick response, but still doesn't work.
Same error, different lines,
6,3 and 7,3
Also, is there a way to run the client and not have it close everytime it fails to load. Think I saw something like that on the wiki, can't remember where.
Strings aren't integers or floats.
(03-12-2012, 01:55 AM)Your Computer Wrote: [ -> ]Strings aren't integers or floats.
Meaning it should be like this:
void OnStart()
{
SetEntityPlayerInteractCallback("key_study_1", "ActivateMonster", true);
}
void OnEnter()
{
}
void OnLeave()
{
}
void ActivateMonster(string &in item)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "idle");
}
Or- You had AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1",
"0", "idle");
Should be: AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1",
0, "idle");
Not sure what you mean Your computer, but I got it to work.
http://pastie.org/3574683
Had some things in quotation marks that weren't supposed to be in quotation marks. What I hate about scripting is that a small error, can ruin everything...
Edit: Guy above kind of ninjad me...