SAC 28 Posted December 21, 2021 Share Posted December 21, 2021 _TASK_START_SCENARIO_IN_PLACE works fine at making peds start scenarios. However, some scenarios generate props (brooms, buckets etc) which get left behind when the ped finishes the scenario, eventually leading to prop clutter. Question is, how to script the props / peds / scenarios whatever to clean up the props when the scenario ends? TY Quote My Fallout 4 and Skyrim mods: SAC - LoversLab Link to comment Share on other sites More sharing options...
crossed99 43 Posted December 22, 2021 Share Posted December 22, 2021 You can use this to make whatever is in the ped's hand disappear before they drop it, I don't know if there's a better way, let me know if you find one :) WEAPON::_HIDE_PED_WEAPONS(myPed, 0, true); Quote Link to comment Share on other sites More sharing options...
SAC 28 Posted December 29, 2021 Author Share Posted December 29, 2021 DM-ed the author of Rampage, because Rampage ends the scenarios gracefully, and got this guidance void PlayScenarioFunc(std::string scenario) { Ped PlayerPed = PLAYER::PLAYER_PED_ID(); TASK::CLEAR_PED_TASKS_IMMEDIATELY(PlayerPed, false, false); TASK::TASK_START_SCENARIO_IN_PLACE_HASH(PlayerPed, StringHash(std::move(scenario)), 0, true, 0, 0.0f, false); } To directly abort scenarios use TASK::CLEAR_PED_TASKS_IMMEDIATELY(PLAYER::PLAYER_PED_ID(), false, false); To end the scenario normally use TASK::CLEAR_PED_TASKS(PLAYER::PLAYER_PED_ID(), true, true); Haven't checked it yet, I am busy tracing a game crash (most likely something related to rope physics) Quote My Fallout 4 and Skyrim mods: SAC - LoversLab Link to comment Share on other sites More sharing options...
HughJanus 244 Posted December 30, 2021 Share Posted December 30, 2021 On 12/29/2021 at 5:53 AM, SAC said: DM-ed the author of Rampage, because Rampage ends the scenarios gracefully, and got this guidance void PlayScenarioFunc(std::string scenario) { Ped PlayerPed = PLAYER::PLAYER_PED_ID(); TASK::CLEAR_PED_TASKS_IMMEDIATELY(PlayerPed, false, false); TASK::TASK_START_SCENARIO_IN_PLACE_HASH(PlayerPed, StringHash(std::move(scenario)), 0, true, 0, 0.0f, false); } To directly abort scenarios use TASK::CLEAR_PED_TASKS_IMMEDIATELY(PLAYER::PLAYER_PED_ID(), false, false); To end the scenario normally use TASK::CLEAR_PED_TASKS(PLAYER::PLAYER_PED_ID(), true, true); Haven't checked it yet, I am busy tracing a game crash (most likely something related to rope physics) This is true for the task the npc is executing. I dont know if it will make spawned objects vanish, though. Quote Link to comment Share on other sites More sharing options...
SAC 28 Posted December 30, 2021 Author Share Posted December 30, 2021 2 hours ago, HughJanus said: This is true for the task the npc is executing. I dont know if it will make spawned objects vanish, though. It doesn't, back to square 1 😕 Quote My Fallout 4 and Skyrim mods: SAC - LoversLab Link to comment Share on other sites More sharing options...
Breso 0 Posted February 28, 2022 Share Posted February 28, 2022 you can use KNOCK_OFF_PED_PROP to drop prop, not vanish, maybe this helps you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.