Frictional Games Forum (read-only)
Pick up an key scare event and Black Fog - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Pick up an key scare event and Black Fog (/thread-9863.html)



Pick up an key scare event and Black Fog - Gamemakingdude - 08-19-2011

PHP Code:
SetEntityPlayerInteractCallback("Key_1""HammerScare"true);
    
AddUseItemCallback("""Key_1""mansion_1""UsedKeyOnDoor"true);
}

void UsedKeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked(asEntity,false,true);
    
PlaySoundAtEntity("","unlock_door"asEntity0false);
    
RemoveItem(asItem);
}

void HammerScare() {
    
AddPropForce("sledge_1"99000"world");
    


So, how do i make it when you pick up a key. It activates my scare event.


And how do i make black fog. I remember in a custom map, that they have black fog. I also remember it in Amensia where you go into the cellar near the chain room (with the wierd torch)


RE: Pick up an key scare event and Black Fog - Rapture - 08-19-2011

Code:
void KeyName(string &in entity, string &in type)
{
  
}

For your key, go to the Entity Tab in the property menu on the right side. In "CallbackFunc" put something in their, it must match the name in the function above (i.e. Keyname).


I believe your looking for FogAreas (Hotkey = Ctrl+1) on the left side pane.