Jagsrs28
Member
Posts: 101
Threads: 25
Joined: Jun 2012
Reputation:
0
|
RE: How to get Grunt to open cabinet doors
(06-22-2012, 05:25 PM)drunkmonk Wrote: (06-22-2012, 05:11 PM)Jagsrs28 Wrote: I am TERRIBLE at writing script. I scrapped my idea of having the Grunt hide in a cabinet (Mainly because I am terrible at writing script.) and decided to just have the Grunt come up to the cabinet open it then vanish. Can you just give me the script and where to put it? Please this will help me out A LOT.
Grunt Name: Grunty1
Cabinet Name: Cabby1
Where in here do I put the script?
////////////////////////////
// Run first time starting map
void OnStart()
{
}
////////////////////////////
// Run when leaving map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
You guys are the best so I know you can answer this ////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Grunt1", "monster_opendoor_area", monster_opendoor", true, 1);
}
void monster_opendoor(string &in asParent, string &in asChild, int alState)
{
AddPropImpulse("Cabby1", -10.0 , 0, 0, "World");
AddTimer("", 1.0, monsterdisable);
}
void monsterdisable(string &in asTimer)
{
SetEntityActive("servant_grunt_1", false);
}
////////////////////////////
// Run when leaving map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
it should look something like this, you will also have to add path nodes for the monster and you may need to play around with the AddImpulse settings.
This website will tell you everything you need to know, it is alot of information but you will get the hang of it
http://wiki.frictionalgames.com/hpl2/amn..._functions How do I set path nodes? I know absolutely nothing about writing script for Amnesia. How would I "Play around" with the AddImpulse settings?
Special Custom Story for 2 special people!
|
|
06-22-2012, 05:40 PM |
|