I don´t think i have the rights in the wiki to do so. As you you can see, i´m pretty new to this forum and wiki
But i can post it here!
So to open and close most doors in Soma with a button just set under the buttons entity->connection->ConnectedEntity the doors name you want to open.
(If you want to open more doors with one button, set a comma between the two names)
(If you want to have two buttons for one door and pressing one button should influence the state of the other button, connect also the two buttons with each other.)
To OPEN the heavy tau radiation swingdoor you need a script under MainCallbacks:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
void OnChange_BulkheadOpen(const tString &in asEntity, int alState){
//Entity_SetInteractionDisabled(asEntity, true);
tString sDoor = "cool1";
Entity_PlayAnimation(sDoor, "swingdoor_tau_radiation_open_swing", 0, false, true, "Animation_BulkheadUnlocked");
Map_AddTimer(sDoor, 20.0f, "NuclearDoorSwingOpen");
}
void NuclearDoorSwingOpen(const tString &in asTimer)
{
Sound_CreateAtEntity("DoorSwingingOpen", "04_02_tau_inside/SFX/nuclear_bulkhead/swinging", asTimer);
}
void Animation_BulkheadUnlocked(const tString &in asEntityName, const tString &in asAnimName)
{
Timer_OpenBulkhead(asEntityName);
Map_AddTimer("cool1", 3, "TimerDeactivateEntity");
Map_AddTimer("cool1", 1, "TimerLockMovingButton");
Map_AddTimer("cool1", 1, "TimerAllowMovingButtonTurnOff");
Map_AddTimer("timer_deactivateblocker", 6.25f, "TimerDeactivateFirstBulkheadBlocker");
}
void Timer_OpenBulkhead(const tString &in asTimer)
{
SwingDoor_SetLocked(asTimer, false, true);
SwingDoor_PushOpen(asTimer, 0.02, 90,0.2);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
with cool1 as the doors name, you just need to set under the buttons entity->BasicCallbacks->ConnectionStateChangeCallback OnChange_BulkheadOpen
Unfortunately i don´t know how to close it, but maybe you find something in the tau_inside script.
Greets!