(06-19-2019, 12:49 PM)Romulator Wrote: Wew, a lot of things at once.
1. Short answer; no. We don't have the source code.
Long answer: No - and frankly, don't use too many spotlights. Just use a Pointlight or a few. You don't need to have shadows everywhere, and given how bright that lamp is (it's too bright, it's white light, mind you), even if a shadow were cast, light bouncing off walls would really lower the amount of shadow.
2. Ropes will try to always go 'as the crow flies' from point A to point B; through walls and objects if they must. They will elasticise and rest (think of it like how gravity arches a piece of string downward if there is slack) but will still go through the floor, off the top of my head. Your issue with the objects may be more linked to the strength of the rope. I don't have much experience with ropes but it wouldn't surprise me if what you are trying to do is a bit difficult with ropes alone, but you may have more luck with an edited model, since I bet you can get a similar effect with how the pig corpse and an interactable ragdoll work.
3. Put a PathNode on each step.
4. Create a ScriptArea around the door, and add a collide callback where the enemy or enemies are parents and the ScriptArea is the child. Check for what state the monster is in, and open the door using force when they enter the area, and close it when they exit.
void InteractWithDoor(string &in asParent, string &in asChild, int alState) { //You need to edit this code, supply the name of the door to open //as it is named in your map. You can also use "|| (GetEnemyStateName(asParent)" //to check for more than just the Patrol state. See the Engine Scripts page.
string door = "<name of door>"; if(alState == 1) {
if(GetEnemyStateName(asParent) == "Patrol") { //Enemy has entered area and is just patrolling (normal walking state). //First set the door to not close automatically so it can be opened via script. SetSwingDoorDisableAutoClose(door, true); //Now open the door. You may want to use either AddPropForce or AddPropImpulse. //Open against Positive/Negative X/Z axis depending on which way the door faces. } } else { //Enemy leaves area. Just close the door. SetSwingDoorDisableAutoClose(door, false); SetSwingDoorClosed(door, true, true); } }
If you are using a retail copy of Amnesia (i.e., you purchased it from Frictional Games directly or bought it in stores forever ago), you need to be on Update 1.3 or above to use GetEnemyStateName. If you need to update, you can do so from here.
5. Personally, I'd keep track of a variable which functions like a boolean, and just switch between the two.
6. Now I think you can move Areas with SetEntityPos(). As such, you should be able to move Liquid Areas using a looping timer. Place down the water plane entity in entities/special/water_planes/ and use SetEntityPos to raise the entity, and do the same with the LiquidArea. Repeat until greater than the desired height. Have the LiquidArea scaled in such a way that its topmost bit is in line with the entity for the best effect.
void RiseWater(string &in asTimer) { //Increase or decrease these to change the speed or rise of the water. float TimerTick = 0.25f; //Tick every 1/4th of a second float increaseY = 0.125f; //Rise by 0.125f on the Y axis.
//Do until greater than the desired height. In this case, 3.5 Y. if(GetEntityPosY("water_plane_ch02_16") > 3.5f) { SetEntityPos("LiquidArea_1", GetEntityPosX("LiquidArea_1"), GetEntityPosY("LiquidArea_1")+increaseY, GetEntityPosZ("LiquidArea_1"); SetEntityPos("water_plane_ch02_16", GetEntityPosX("water_plane_ch02_16"), GetEntityPosY("water_plane_ch02_16")+increaseY, GetEntityPosZ("water_plane_ch02_16"); } else AddTimer("newRiseWaterTimer", TimerTick, "RiseWater"); }