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
Button that opens and closes doors
Kanthos Offline
Junior Member

Posts: 48
Threads: 7
Joined: Oct 2015
Reputation: 1
#13
RE: Button that opens and closes doors

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!
10-05-2015, 05:40 PM
Find


Messages In This Thread
Button that opens and closes doors - by Kanthos - 10-03-2015, 10:45 PM
RE: Button that opens and closes doors - by WALP - 10-04-2015, 01:56 PM
RE: Button that opens and closes doors - by WALP - 10-04-2015, 02:29 PM
RE: Button that opens and closes doors - by Vale - 10-05-2015, 05:12 PM
RE: Button that opens and closes doors - by Kanthos - 10-05-2015, 05:40 PM
RE: Button that opens and closes doors - by Vale - 10-05-2015, 06:19 PM
RE: Button that opens and closes doors - by Vale - 10-06-2015, 05:51 PM



Users browsing this thread: 1 Guest(s)