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
Amnesia script help!
theodorg Offline
Junior Member

Posts: 44
Threads: 11
Joined: Aug 2013
Reputation: 0
#4
RE: Amnesia script help!

(08-21-2013, 07:49 PM)The chaser Wrote:
(08-21-2013, 07:03 PM)theodorg Wrote: Hello im trying to make a key open a door in amnesia.
Heres my script:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Awesome_key", "Awesome_door", "ABC", true);
}

void ABC(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem("Awesome_key");
}



////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Awesome_key", "Awesome_door", "ABC", true);
}

void ABC(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked( "Awesome_door", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Awesome_door", 0, false);
RemoveItem("Awesome_key");
}



////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Check that the names match and delete .map_cache if there's any.

I dont see a map cache and i have the correct names that im sure of i followed a guide doing this u can check it out here http://wiki.frictionalgames.com/hpl2/tut...cks_a_door

If u see any problems pls help im new to this!

(08-21-2013, 07:49 PM)The chaser Wrote:
(08-21-2013, 07:03 PM)theodorg Wrote: Hello im trying to make a key open a door in amnesia.
Heres my script:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Awesome_key", "Awesome_door", "ABC", true);
}

void ABC(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem("Awesome_key");
}



////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Awesome_key", "Awesome_door", "ABC", true);
}

void ABC(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked( "Awesome_door", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Awesome_door", 0, false);
RemoveItem("Awesome_key");
}



////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Check that the names match and delete .map_cache if there's any.
Also i can get ingame but when i try to open the door with the key it just sais i cant use the item that way.
(This post was last modified: 08-21-2013, 08:27 PM by theodorg.)
08-21-2013, 08:23 PM
Find


Messages In This Thread
Amnesia script help! - by theodorg - 08-21-2013, 07:03 PM
RE: Amnesia script help! - by Mudbill - 03-21-2014, 11:32 PM
RE: Amnesia script help! - by theodorg - 03-21-2014, 11:36 PM
RE: Amnesia script help! - by Vale - 03-22-2014, 12:39 AM
RE: Amnesia script help! - by theodorg - 03-22-2014, 01:23 AM
RE: Amnesia script help! - by Mudbill - 03-22-2014, 12:43 AM
RE: Amnesia script help! - by Mudbill - 03-22-2014, 02:45 AM
RE: Amnesia script help! - by theodorg - 03-22-2014, 05:16 PM
RE: Amnesia script help! - by Mudbill - 03-22-2014, 07:02 PM
RE: Amnesia script help! - by theodorg - 03-23-2014, 12:16 AM
RE: Amnesia script help! - by Romulator - 03-23-2014, 12:57 AM
RE: Amnesia script help! - by Mudbill - 03-23-2014, 12:59 AM
RE: Amnesia script help! - by Traggey - 08-21-2013, 07:42 PM
RE: Amnesia script help! - by The chaser - 08-21-2013, 07:49 PM
RE: Amnesia script help! - by theodorg - 08-21-2013, 08:23 PM
RE: Amnesia script help! - by The chaser - 08-21-2013, 10:24 PM
RE: Amnesia script help! - by theodorg - 08-22-2013, 03:38 PM
RE: Amnesia script help! - by PutraenusAlivius - 08-22-2013, 04:12 PM
RE: Amnesia script help! - by theodorg - 08-22-2013, 06:09 PM
Amnesia script help! - by theodorg - 08-23-2013, 03:49 PM
RE: Amnesia script help! - by Neelke - 08-23-2013, 04:06 PM
RE: Amnesia script help! - by Traggey - 08-23-2013, 04:17 PM
RE: Amnesia script help! - by Adrianis - 08-23-2013, 04:36 PM
RE: Amnesia script help! - by theodorg - 08-23-2013, 06:42 PM
Amnesia script help! - by theodorg - 08-23-2013, 08:14 PM
RE: Amnesia script help! - by Your Computer - 08-23-2013, 08:36 PM
RE: Amnesia script help! - by summit - 08-24-2013, 07:57 AM
Amnesia script help! - by theodorg - 08-24-2013, 10:30 AM
RE: Amnesia script help! - by The chaser - 08-24-2013, 11:00 AM
RE: Amnesia script help! - by theodorg - 08-24-2013, 11:23 AM
RE: Amnesia script help! - by PutraenusAlivius - 08-24-2013, 12:40 PM
RE: Amnesia script help! - by Traggey - 08-24-2013, 02:41 PM
Amnesia script help! - by theodorg - 03-21-2014, 07:21 PM
RE: Amnesia script help! - by Daemian - 03-21-2014, 07:29 PM
RE: Amnesia script help! - by Mudbill - 03-21-2014, 08:28 PM
RE: Amnesia script help! - by theodorg - 03-21-2014, 10:43 PM
RE: Amnesia script help! - by plutomaniac - 03-21-2014, 08:34 PM



Users browsing this thread: 1 Guest(s)