elsewhat Posted August 15, 2017 Share Posted August 15, 2017 Hi, I need to trigger a ped to sneak to a location. Have tried PED::SET_PED_STEALTH_MOVEMENT(getPed(), 1, 0); And PED::FORCE_PED_MOTION_STATE(getPed(), 1110276645, false, 0, 0);PED::_0x2208438012482A1A(getPed(), 0, 0);UNK1::_0x81CBAE94390F9F89(); This kind of works, but doesn't give the effect I want PED::SET_PED_MOVEMENT_CLIPSET(getPed(), "move_ped_crouched", 1.0); Currently using AI::TASK_GO_STRAIGHT_TO_COORD for the actual movement, but might need to switch to AI::TASK_GO_TO_COORD_ANY_MEANS.AI::TASK_GO_TO_COORD_ANY_MEANS has a walking style parameter but not sure what are the valid values Link to comment Share on other sites More sharing options...
sollaholla Posted August 15, 2017 Share Posted August 15, 2017 (edited) PED::SET_PED_STEALTH_MOVEMENT(getPed(), 1, 0); Make sure you specify the action mode. "DEFAULT_ACTION" is usually what's found in most scripts. Example C#: Function.Call(Hash.SET_PED_STEALTH_MOVEMENT, Game.Player.Character, true, "DEFAULT_ACTION"); // Tested, 100% working. Note that few peds have the ability to use stealth movement. Mainly MP Characters, Story Characters, and (some?) Police Officers. Other action modes: DEFAULT_ACTIONMP_FEMALE_ACTIONMICHAEL_ACTIONFRANKLIN_ACTIONTREVOR_ACTION Setting action to "0" actually clears the stealth movement, afaik. Here's my evidence: From ob_franklin_tv: if (PED::GET_PED_STEALTH_MOVEMENT(PLAYER::PLAYER_PED_ID())) { PED::SET_PED_STEALTH_MOVEMENT(PLAYER::PLAYER_PED_ID(), 0, 0);} and anytime an p1 is true, the action is always specified. My source code: using GTA;using GTA.Native;namespace StealthMovementTest{ public class Core : Script { public Core() { KeyUp += OnKeyUp; } private void OnKeyUp(object sender, System.Windows.Forms.KeyEventArgs e) { switch(e.KeyCode) { case System.Windows.Forms.Keys.K: if (Function.Call<bool>(Hash.GET_PED_STEALTH_MOVEMENT, Game.Player.Character)) { Function.Call(Hash.SET_PED_STEALTH_MOVEMENT, Game.Player.Character, false, string.Empty); break; } Function.Call(Hash.SET_PED_STEALTH_MOVEMENT, Game.Player.Character, true, "DEFAULT_ACTION"); break; } } }} Edited August 16, 2017 by sollaholla jedijosh920 and elsewhat 2 Link to comment Share on other sites More sharing options...
elsewhat Posted August 17, 2017 Author Share Posted August 17, 2017 Thanks! Had tried the "DEFAULT_ACTION" param, but with a ped which didn't support stealth sollaholla 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now