russin 0 Posted November 28, 2003 how to make a Soldier kneel and stay there ? ive searched and searched and found 1 but it don't work once i kill the guy his dead body keeps gettin back up and down after he dies.... i no ive seen it done before in a mission but im stumped to find it with the mass of missions in my folder thanks... Share this post Link to post Share on other sites
Harkonin 0 Posted November 28, 2003 groupname = group this; BEHAVE="COMBAT"; STATUS="UP"; STANCE="crouch"; "_x setbehaviour BEHAVE" foreach units groupname; "_x setunitpos STATUS" foreach units groupname; "_x switchmove STANCE" foreach units groupname; Share this post Link to post Share on other sites
Harkonin 0 Posted November 28, 2003 They will stand up once they engage, only way ti stop it is with disable AI move but then they won't move or shoot. Share this post Link to post Share on other sites
bn880 5 Posted November 28, 2003 Tried this yet? soldierOne setUnitPos "Down" EDIT: Ahh never mind, I thought you meant Prone. Share this post Link to post Share on other sites
russin 0 Posted November 28, 2003 ive asked this question before but the way it is it's not working good there must be a way Share this post Link to post Share on other sites
bn880 5 Posted November 28, 2003 Not necessairly. Lack of control over AI is an issue in OFP. Share this post Link to post Share on other sites
hardrock 1 Posted November 28, 2003 I don't know, but maybe with _soldier addEventHandler ["killed",{_this disableAI "MOVE"}] ? Share this post Link to post Share on other sites
russin 0 Posted November 29, 2003 ok i got it to work not any of the ways listed above they stay on one knee now and will engage if any need a example mission to see how ive done it id be glad to send them the mission as i suck too explain how it works ahhhhhhh im so happy now yippie !!!! Share this post Link to post Share on other sites
Viriato 0 Posted November 29, 2003 YES YES!! Send it to me, please, i had been triying this to work for a loong time till i leave it as impossible!! todoesrelativo@hotmail.com admin@broquel.com Share this post Link to post Share on other sites
russin 0 Posted November 29, 2003 ok here ya go any who need to see it in action it is on desert Island  Kneel Tutorial for Editor !!!! click here Share this post Link to post Share on other sites
sanctuary 19 Posted November 30, 2003 You used the "How to" (in the page 5 or 6) i wrote in the Mission Editing FAQ up there. nice to see that someone made an example mission of it , as it can be easier to understand when seeing it rather than reading it in the FAQ ;) Share this post Link to post Share on other sites
russin 0 Posted November 30, 2003 You used the "How to" (in the page 5 or 6) i wrote in the Mission Editing FAQ up there.nice to see that someone made an example mission of it , as it can be easier to understand when seeing it rather than reading it in the FAQ ;) well i never did but mabe somehow i got it inavertly haha all i no is that i can finally have guys kneel Share this post Link to post Share on other sites
Harkonin 0 Posted November 30, 2003 Yeah but they won't shoot at anyone while crouched. If you script it and add the parameters of dowatch, dotarget and dofire this will fix your problem. Share this post Link to post Share on other sites
Harkonin 0 Posted November 30, 2003 Hmm no good so far but heres your crouch script (they still won't shoot) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _grp = _this select 0 ({_x setbehaviour "COMBAT"} forEach units _grp); ({_x setcombatmode "RED"} forEach units _grp); ?!(alive _grp):exit #loop ({_x setunitpos "up"} forEach units _grp); ({_x switchmove "crouch"} forEach units _grp); ({_x dowatch player} forEach units _grp); ({_x dotarget player} forEach units _grp); ~0.15 goto"loop" Share this post Link to post Share on other sites
russin 0 Posted November 30, 2003 dammit your right they won't fire could you edit the mission i made above to work PLEase im not that good at it so im not sure how to add what ya wrote Share this post Link to post Share on other sites
Harkonin 0 Posted December 1, 2003 Use this - Execute with [this] Exec "croucher.sqs" btw if used for an entire group simply put it in the officers initfield. _grp = _this select 0 ({_x setbehaviour "COMBAT"} forEach units _grp); ({_x setcombatmode "RED"} forEach units _grp); ({_x setunitpos "up"} forEach units _grp); ({_x switchmove "crouch"} forEach units _grp); #start ?!(alive _grp):exit ?(_grp knowsabout player <= 0.49):goto"start" ?(_grp knowsabout player >= 0.5):goto"Fire" #fire ?!(alive _grp):exit ({_x setbehaviour "COMBAT"} forEach units _grp); ({_x setcombatmode "RED"} forEach units _grp); ({_x setunitpos "up"} forEach units _grp); ({_x switchmove "crouch"} forEach units _grp); ({_x dotarget player} forEach units _grp); ({_x dofire player} forEach units _grp); ~0.2 ?!(alive player) || (_grp knowsabout player <=0.49):goto"start" goto"fire" Share this post Link to post Share on other sites
sanctuary 19 Posted December 1, 2003 I think i found the problem in your example mission that prevented the resistance soldier to open fire. Near them i created a 3 men russian patrol , and the crouched AI just looked at them behind his barrier cover, aiming at them but without firing. I tried several things , always aiming without firing. As i wrote that "how to" have the AI to crouch in the mission editing faq, i knew that it worked for me before, so something was wrong but what ?. Then i removed the barrier. And the crouched resistance soldier opened fire on sight , crouched. I added again the barrier to check, and he didnt fired again. Tada ! that was the problem. A crouched AI , with this method doesnt seem to be able to open fire (you can notice that he try to aim up sometime) if he is behind some objects used as cover. I didnt tried all the objects of the editor , maybe there are some that doesnt prevent the crouched guy to fire. Share this post Link to post Share on other sites
Sinister-tnuC- 0 Posted December 2, 2003 have u tried this script from Zayfod? http://www.flashpoint1985.com/cgi-bin....er+hold Share this post Link to post Share on other sites
Gameer 0 Posted December 2, 2003 I think i found the problem in your example mission that prevented the resistance soldier to open fire.Near them i created a 3 men russian patrol , and the crouched AI just looked at them behind his barrier cover, aiming at them but without firing. I tried several things , always aiming without firing. As i wrote that "how to" have the AI to crouch in the mission editing faq, i knew that it worked for me before, so something was wrong but what ?. Then i removed the barrier. And the crouched resistance soldier opened fire on sight , crouched. I added again the barrier to check, and he didnt fired again. Tada ! that was the problem. A crouched AI , with this method doesnt seem to be able to open fire (you can notice that he try to aim up sometime) if he is behind some objects used as cover. I didnt tried all the objects of the editor , maybe there are some that doesnt prevent the crouched guy to fire. I do believe that if you set the sandbag's damage to 1 (dead) they will fire over the top of it. I think. Gameer Share this post Link to post Share on other sites
atfigure 0 Posted December 5, 2003 you can use the setpos command and bury the sandbags or wall a little bit into the ground, i have done this and it works fine Share this post Link to post Share on other sites