I am finally doing some sort of topic on this since I am on a P.C with all the decompiled scripts on it. I didn't decompile them myself but got them from a source so just bear with me as everything is not 100 percent. Most props work a certain way and are meant to run during certain missions. Different from any other thing ingame they have their own animations and Action Node's
So the very first I will get into are the Autoshop gate's they run by setting them open or closed. Here are some codes to how they work read them closely you also need the Action Tree's loaded and Animation Groups.
Load("Act/Conv/1_07.act")
LoadActionTree("Act/Props/SBarels1.act")
LoadActionTree("Act/Props/barrelLad.act")
LoadActionTree("Act/Conv/1_03.act")
LoadActionTree("Act/Anim/1_03_Davis.act")
DATLoad("1_03.DAT", 2)
DATLoad("1_07.DAT", 2)
DATLoad("tschool_garagedoors.DAT", 2)
DATLoad("tbarrels.DAT", 2)
DATInit()
PAnimCreate(TRIGGER._TSCHOOL_AUTOSHOPFGATE) This is the first gate when running toward it in The Setup.
PAnimCloseDoor(TRIGGER._TSCHOOL_AUTOSHOPFGATE)
AreaSetDoorLockedToPeds(TRIGGER._TSCHOOL_AUTOSHOPFGATE, false)
AreaSetDoorPathableToPeds(TRIGGER._TSCHOOL_AUTOSHOPFGATE, true)
PAnimCreate(TRIGGER._SCGRDOOR) This is the silver door that Trent is standing near.
PAnimCloseDoor(TRIGGER._SCGRDOOR)
AreaSetDoorLockedToPeds(TRIGGER._SCGRDOOR, false)
AreaSetDoorPathableToPeds(TRIGGER._SCGRDOOR, true)
PAnimCreate(TRIGGER._1_07_GATE_T) This is the door all the way at the end used on Defend Bucky got them both working correctly heh.
PAnimSetActionNode(TRIGGER._1_07_GATE_T, "/Global/1_07/CloseGate/PropClosed", "Act/Conv/1_07.act")
AreaSetDoorPathableToPeds(TRIGGER._1_07_GATE_T, true)
AreaSetDoorLockedToPeds(TRIGGER._1_07_GATE_T, false)
PAnimCreate(TRIGGER._SCGRDOOR01) This is the silver door that Ethan runs out of.
PAnimCloseDoor(TRIGGER._SCGRDOOR01)
AreaSetDoorLockedToPeds(TRIGGER._SCGRDOOR01, false)
AreaSetDoorPathableToPeds(TRIGGER._SCGRDOOR01, true)
PAnimCreate(TRIGGER._SCGRDOOR02) This is the silver door where Wade and Tom runs out of.
PAnimCloseDoor(TRIGGER._SCGRDOOR02)
AreaSetDoorLockedToPeds(TRIGGER._SCGRDOOR02, false)
AreaSetDoorPathableToPeds(TRIGGER._SCGRDOOR02, true)
To create the door that you go threw at the chem plant just add this,
SoundEnableInteractiveMusic(false)
SoundDisableSpeech_ActionTree()
LoadAnimationGroup("DO_STRIKECOMBO")
LoadAnimationGroup("BOXING")
LoadAnimationGroup("C_Wrestling")
DisablePunishmentSystem(true)
LoadActionTree("Act/Anim/DO_Edgar.act")
LoadActionTree("Act/AI/AI_EDGAR_5_B.act")
LoadActionTree("Act/Conv/5_B.act")
LoadModels("Act/Conv/5_B.act", 387)
AreaSetDoorLocked("5_B_CHEM_DOOR", true)
AreaSetDoorLocked("5_B_CHEM_DOOR_2", true)
AreaSetDoorLocked("DT_ChemPlant_DoorL", true)
PedSaveWeaponInventorySnapshot(gPlayer)
PAnimCreate(TRIGGER._5_B_SECDOOR1)
PAnimCreate(TRIGGER._5_B_SECDOOR2)
AreaSetDoorLocked(TRIGGER._5_B_SECDOOR1, true)
AreaSetDoorLocked(TRIGGER._5_B_SECDOOR2, true)
l_0_21 =
l_0_20 = PAnimGetPoolIndex("CH_ElevDoorC", -761.78997802734, 91.76490020752, 7.6157898902893, 5)
l_0_23 =
l_0_22 = PAnimGetPoolIndex("CH_ElevDoorD", -760.94097900391, 91.76490020752, 7.6157999038696, 5)
PAnimFollowPath(l_0_20, l_0_21, PATH._5_B_ELEVATOR_C, false)
PAnimSetPathFollowSpeed(l_0_20, l_0_21, 0.5)
PAnimFollowPath(l_0_22, l_0_23, PATH._5_B_ELEVATOR_D, false)
PAnimSetPathFollowSpeed(l_0_22, l_0_23, 0.5)
l_0_21 =
l_0_20 = PAnimGetPoolIndex("CH_ElevDoorC", -761.78997802734, 91.76490020752, 7.6157898902893, 5)
l_0_23 =
l_0_22 = PAnimGetPoolIndex("CH_ElevDoorD", -760.94097900391, 91.76490020752, 7.6157999038696, 5)
PAnimFollowPath(l_0_20, l_0_21, PATH._5_B_EC_CLOSE, false)
PAnimSetPathFollowSpeed(l_0_20, l_0_21, 0.5)
PAnimFollowPath(l_0_22, l_0_23, PATH._5_B_ED_CLOSE, false)
PAnimSetPathFollowSpeed(l_0_22, l_0_23, 0.5)
gDoorEnded = false
if gClosingDoor then
gClosingDoor = false
SoundLoopPlay2D("ChemDoorClose", false)
end
gOpeningDoor = true
SoundLoopPlay2D("ChemDoorOpen", true)
PAnimSetPathFollowSpeed(TRIGGER._5_B_SECDOOR1, 0.5)
PAnimSetPathFollowSpeed(TRIGGER._5_B_SECDOOR2, 0.5)
gDoorEnded = false
if gOpeningDoor then
gOpeningDoor = false
SoundLoopPlay2D("ChemDoorOpen", false)
end
gClosingDoor = true
if l_0_12 then
SoundLoopPlay2D("ChemDoorClose", true)
end
PAnimSetPathFollowSpeed(TRIGGER._5_B_SECDOOR1, -0.5)
PAnimSetPathFollowSpeed(TRIGGER._5_B_SECDOOR2, -0.5)
PAnimFollowPath(TRIGGER._5_B_SECDOOR1, PATH._5_B_DOORA_OPEN, false, F_DoorsOpenClosed_Callback)
PAnimFollowPath(TRIGGER._5_B_SECDOOR2, PATH._5_B_DOORB_OPEN, false, F_DoorsOpenClosed_Callback)
PAnimSetPathFollowSpeed(TRIGGER._5_B_SECDOOR1, 0)
PAnimSetPathFollowSpeed(TRIGGER._5_B_SECDOOR2, 0)
gClosingDoor = false
SoundLoopPlay2D("ChemDoorClose", false)
gOpeningDoor = false
SoundLoopPlay2D("ChemDoorOpen", false)
if PlayerIsInTrigger(TRIGGER._5_B_LIFTUP) then
if IsButtonPressed(9, 0) then
PAnimFollowPath(l_0_18, l_0_19, PATH._5_B_ELEVATOR_DOWN, false)
PAnimSetPathFollowSpeed(l_0_18, l_0_19, 1)
end
elseif PlayerIsInTrigger(TRIGGER._5_B_LIFTDOWN) and IsButtonPressed(9, 0) then
PAnimFollowPath(l_0_18, l_0_19, PATH._5_B_ELEVATOR_UP, false)
PAnimSetPathFollowSpeed(l_0_18, l_0_19, 1)
Don't know much about the elevator but this should close some of the doors in the chem plant and at The Autoshop.