Ok so I made a new script, I'm trying to replicate the scene where you encounter a grunt at the
Spoiler below!
stair in the prison from Amnesia
I had a look at their script file and here's how I changed it a bit:
(The area is now called ScriptArea_1 and the grunt(placeholder) is called servant_grunt_1.)
////////////////////////////
// Run first time starting map
void OnStart()
{
//GRUNT WHEN PASSING THE SCRIPT AREA
void CollideAreaScriptArea_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
void OnStart()
{
AddEntityCollideCallback("Player", "MonsterDoor", "CollidePlayerWithMonsterDoor", true, 1);
}
void CollidePlayerWithMonsterDoor(string &in asParent, string &in asChild, int alState)
{
AddDebugMessage("Debug Message: Area Collided! Now ScaryDude must be activated!", false);
}
SetEntityActive("Scarydude", true);
FadeRadialBlurto(1.0f, 1.0f);
PlaySoundAtEntity("MonsterDoor", "react_scare", "Player", 0.0, false);
ShowEnemyPlayerPosition("Scarydude");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Anything wrong? What I think might be wrong is the debug messages place in the script, I think I put it in the wrong place since it's not working at all.
Well it didn't show me any debug messages this time, (used Tanshaydars script) I guess it doesn't collide with the player (the area)
How can I make it collide?
''Sick, twisted child... You'll burn for this!''
(This post was last modified: 06-19-2011, 04:38 PM by Doctorcheese.)
(06-19-2011, 06:16 PM)Tanshaydar Wrote: Are you sure "show debug messages" is checked in debug menu? (F1)
Mmhm, it's checked all right.
But you can close the thread though, I remade the scene so I'll script it some other time There might be something wrong in my settings that prevent the scripts from working or something like that...