King of tentacle Posted September 4, 2020 Posted September 4, 2020 does anyone know how the game tells a bed from a mattress in survival ? please?
Carabosse Posted September 4, 2020 Posted September 4, 2020 There's a function in the HC_ManagerScript (main survival mode script) called WakeUpPlayerBasedOnBedType that's called on a PlayerSleepStart event. It differentiates the passed in bed Object Reference between beds, sleeping bags and others (mattresses etc). The bed object check functions are: bool Function IsSleepingBag(ObjectReference RefToCheck) return CommonArrayFunctions.CheckObjectAgainstKeywordArray(RefToCheck, SleepingBagKeywords) EndFunction bool Function IsMattress(ObjectReference RefToCheck) return CommonArrayFunctions.CheckObjectAgainstKeywordArray(RefToCheck, MattressKeywords) EndFunction bool Function IsBed(ObjectReference RefToCheck) return CommonArrayFunctions.CheckObjectAgainstKeywordArray(RefToCheck, BedKeywords) EndFunction The keyword array declarations: keyword[] Property SleepingBagKeywords const auto mandatory {a bed with any of these keywords will be treated as a sleeping bag, wins over Mattress and Bed keywords} keyword[] Property MattressKeywords const auto mandatory {a bed with any of these keywords will be treated as a matress, wins over Bed keywords} keyword[] Property BedKeywords const auto mandatory {a bed with any of these keywords will be treated as a bed} SleepingBagKeywords contains HC_ObjType_SleepingBag MattressKeywords contains AnimFurnFloorBedAnims BedKeywords contains AnimFurnBedAnims, AnimFurnHospitalBed What a mess!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.