anusmangler 1 Posted November 25, 2013 Hey i thought this would work but it doesnt.... this setPosATL (this modelToWorld[0,0,0]); this setUnitPos "down"; this forceSpeed 0; anyone else have any ideas? Share this post Link to post Share on other sites
iceman77 18 Posted November 25, 2013 Probably need to use a prone type of animation upon (re)spawn. Share this post Link to post Share on other sites
Snipes12 10 Posted November 25, 2013 Hey man, Yes, exactly what iceman said, you'd want to use the prone type animation. I'm assuming you're putting that into the init field of the player in editor, if you are i dont believe it will work unless you place something in the init.sqf file or something that runs after you spawn -- if you put the following code into your init.sqf file it should work: player switchMove "AidlPpneMstpSnonWnonDnon_AI"; Hope i could help! :) Edit: You could also use a trigger that runs after the player spawns Share this post Link to post Share on other sites
anusmangler 1 Posted November 25, 2013 thanks guys! Share this post Link to post Share on other sites
warlord554 2065 Posted November 25, 2013 I use ( this setUnitPos "DOWN" ) in lots of missions, works everytime Share this post Link to post Share on other sites
iceman77 18 Posted November 25, 2013 I use ( this setUnitPos "DOWN" ) in lots of missions, works everytime This works for a unit that is controlled by the player? Share this post Link to post Share on other sites
GuzzenVonLidl 10 Posted November 25, 2013 I use ( this setUnitPos "DOWN" ) in lots of missions, works everytime This works for a unit that is controlled by the player? WarLord554 that is incorrect, setunitpos only works for AI not players, you need to use the animation mentioned above to make it work, recommended if you are going to use the command with respawn you need to use event handlers Share this post Link to post Share on other sites
thirith 27 Posted September 6, 2017 My apologies for the thread necromancy, but I've tried applying this and it doesn't work. Whether I put the switchMove command in the Init box or set the unit to PRONE in the editor, when I test the mission, I always start standing up. Any reliable way of fixing this? Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted September 6, 2017 21 minutes ago, thirith said: My apologies for the thread necromancy, but I've tried applying this and it doesn't work. Whether I put the switchMove command in the Init box or set the unit to PRONE in the editor, when I test the mission, I always start standing up. Any reliable way of fixing this? Try spawning it and wait until the mission is running: _spawn = [this] spawn { params ["_unit"]; waituntil {time > 0}; _unit switchMove "AidlPpneMstpSnonWnonDnon_AI"; }; Cheers 3 Share this post Link to post Share on other sites
thirith 27 Posted September 7, 2017 Brilliant, that did the trick. Thanks! 1 Share this post Link to post Share on other sites
reaper lok 82 Posted September 8, 2017 I just click on the unit and hit the PRONE Tab......am I missing something? Works fine for me ;) 1 Share this post Link to post Share on other sites
thirith 27 Posted September 8, 2017 I did that with all playable units, but when I launch the mission the unit I play stands up. Don't know why that is, but Grumpy Old Man's solution worked just fine. Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted September 8, 2017 11 hours ago, reaper lok said: am I missing something? Yes. Doesn't work with players, which is the problem mentioned in the thread title "Force player to spawn prone". Cheers Share this post Link to post Share on other sites
reaper lok 82 Posted September 8, 2017 38 minutes ago, Grumpy Old Man said: Yes. Doesn't work with players, which is the problem mentioned in the thread title "Force player to spawn prone". Cheers Gottcha - I have only ever used it for spawning while kneeling (good to know) thanx! Share this post Link to post Share on other sites
pvt. partz 248 Posted March 4, 2018 Quote _spawn = [this] spawn { params ["_unit"]; waituntil {time > 0}; _unit switchMove "AidlPpneMstpSnonWnonDnon_AI"; }; I'm not clear as to what to do. When I play coop and I get killed, I respawn standing up. I want to respawn prone. Do I put the quoted script in my init.sqf or in the init.sqf of each of the two players? I'm confused at the wording which says: Quote Doesn't work with players, which is the problem mentioned in the thread title "Force player to spawn prone". Doesn't work with players? Incidentally, our mission has a "onplayerrespawn.sqf. Maybe your script could be added to that? Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted March 4, 2018 7 hours ago, pvt. partz said: I'm not clear as to what to do. Ah well, as long as no private parts got stuck in a fan... Spoiler hee hee If you want to make every player respawn prone use this inside initPlayerLocal.sqf or wherever you seem fit: player addEventHandler ["Respawn",{ player switchMove "amovppnemstpsraswrfldnon"; }]; The animation ending with _AI will make you equip your weapon first for some reason, with the above snippet you respawn prone with weapon in hands. Cheers 7 hours ago, pvt. partz said: Doesn't work with players? @reaper lok suggested to use the editor button for prone, which doesn't work for players. At least back then. Cheers 2 Share this post Link to post Share on other sites
pvt. partz 248 Posted March 4, 2018 12 hours ago, Grumpy Old Man said: Ah well, as long as no private parts got stuck in a fan... .. if I do I will wind up being one GrumpyOldMan... Thanks,...will check it out today! edit: Hmm,...I respawn in prone but then I stand up right away,...? 1) I tried it in the initPlayerLocal.sqf 2) Also in each players init in the editor/save/pbo it/go in game to test. 3) I also put it in the onplayerrespawn.sqf ...no go It Works !! thanks a lot grumpy 1 Share this post Link to post Share on other sites
HazJ 1288 Posted March 5, 2018 Just tested: The unit stance in Eden does work. Also: https://community.bistudio.com/wiki/setUnitPos player playAction "PlayerProne"; // DOWN player playAction "PlayerStand"; // UP player playAction "PlayerCrouch"; // MIDDLE Never saw these before, I assume they came up the Eden Editor (or with stance option). Share this post Link to post Share on other sites
pvt. partz 248 Posted June 20, 2018 back again so, I want to "start" the mission in a kneeling position. First I tried sitting and I put this this switchmove "amovpsitmstpsraswrfldnon" in the player init. That works, So I went into the Editor/Tools/animations config, plugged in my parameters to "kneel" like so, this switchmove "AidlPknlMstpSlowWrflDnon_AI" Doesn't work doubleyouteeeff? PS: I looked at what HazJ posted but couldn't make sense of that either. Double PS: I am using this, http://www.armaholic.com/page.php?id=30571 mod as well and it would be nice if the player spawns (starts) the mission with the weapon holstered. Thanks a lot Share this post Link to post Share on other sites
HazJ 1288 Posted June 20, 2018 Holster first. Then do: player playAction "PlayerCrouch"; Share this post Link to post Share on other sites
pvt. partz 248 Posted June 20, 2018 8 hours ago, HazJ said: Holster first. Then do: If I understand you correctly you mean I should holster the weapon first and then apply your solution? Don't forget I'm wanting to kneel on Mission start so I'm not in game yet. ? Oh, wait, do you mean go into the holster weapon mod to see if there's someplace that defaults to "holster weapon" rather than "weapon in hands"? I'll look when I get home. Share this post Link to post Share on other sites