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 Editor Unexpected { error
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#2
RE: Amnesia Editor Unexpected { error

{
AddUseItemCallback("", "key_1", "mansion_1", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "AreaHelp", "CollideAreaHelp", false, 1);
}
{
AddEntityCollideCallback("Player", "Area1", "CollideArea1", true, 1);
}

those can't just lay in the script file without giving info on when and from what they should be triggered.
I assume you want those to happen right when the game starts the first time so inside void OnStart like this:

////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "Bedroomkey_1", "Bedroom_1", "KeyOnDoor", true);
AddUseItemCallback("", "key_1", "mansion_1", "KeyOnDoor", true);
AddEntityCollideCallback("Player", "AreaHelp", "CollideAreaHelp", false, 1);
AddEntityCollideCallback("Player", "Area1", "CollideArea1", true, 1);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Bedroom_1", false, true);
PlaySoundAtEntity("", "unlock_door", "Bedroom_1", 0, false);
RemoveItem("Bedroomkey_1");
}

void CollideArea1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_2", true, true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key_1");
}
////////////////////////////
// Run when entering map
void OnEnter ()
{
}
////////////////////////////
// Run when leaving map
void OnLeave ()
{
}

02-04-2012, 12:42 PM
Find


Messages In This Thread
Amnesia Editor Unexpected { error - by AnnoyingIB - 02-04-2012, 11:46 AM
RE: Amnesia Editor Unexpected { error - by Khyrpa - 02-04-2012, 12:42 PM



Users browsing this thread: 1 Guest(s)