Jump to content

Recommended Posts

Posted

 

_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

 

 

My Fallout 4 and Skyrim mods: SAC - LoversLab

 

Posted

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);

 

Posted

 

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)

 

My Fallout 4 and Skyrim mods: SAC - LoversLab

 

Posted
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.

Posted
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 😕

 

My Fallout 4 and Skyrim mods: SAC - LoversLab

 

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...