Frictional Games Forum (read-only)
Button that opens and closes doors - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: SOMA (https://www.frictionalgames.com/forum/forum-55.html)
+--- Forum: User created content (https://www.frictionalgames.com/forum/forum-79.html)
+---- Forum: Development (https://www.frictionalgames.com/forum/forum-82.html)
+---- Thread: Button that opens and closes doors (/thread-31165.html)

Pages: 1 2


RE: Button that opens and closes doors - Kanthos - 10-04-2015

I made it. The battle is over.
Thx Mug, it was a lot of experimenting,but i made it. Puh.


RE: Button that opens and closes doors - Vale - 10-05-2015

If you have time consider making a little guide for swingdoors (and regular doors) on the wiki so people with the same problem can solve it easier.
Just a suggestion.


RE: Button that opens and closes doors - Kanthos - 10-05-2015

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 Smile

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!


RE: Button that opens and closes doors - Vale - 10-05-2015

I havent played around with swing doors yet
when i get the chance, if no one has beat me to it, ill recap this in a wiki page once ive looked it over (with credit to you of course)
as far as closing it, its probably possible to do but i dont think its part of the game. I dont remember closing any large doors in tau.
also, have your 1st +rep!


RE: Button that opens and closes doors - Kanthos - 10-05-2015

thx, would be proud to contribute a part to the wiki Smile

Greets!


RE: Button that opens and closes doors - Kanthos - 10-05-2015

@spiritofvale:

in the main game you can´t close the radiation_swingdoors, but there´s an red airlock-swingdoor in phi that you can open and close.

Btw: red airlock-swingdoors function like "most doors" (see above) Big Grin


RE: Button that opens and closes doors - Vale - 10-06-2015

Makes sense, but i think it would be possible to make a reversed 'closing' animation for the large doors if modders dont mind working with custom assets.


RE: Button that opens and closes doors - TheGreatCthulhu - 10-06-2015

@Kanthos

About the wiki.
Anyone can register. Once you register, you'll have edit rights for most of the wiki content. However, for HPL3/Soma section, edit rights are restricted to the Community folder (since the rest is internal documentation FG released for us to use) - but within that folder you can do pretty much anything you want - create subfolder trees, create/edit documents, etc.