Phantom_Fuzz 1 Posted May 4, 2020 Is there any way I can make my Ai Squadron invincible through the in-game command console? Share this post Link to post Share on other sites
POLPOX 778 Posted May 4, 2020 Use allowDamage command. 2 Share this post Link to post Share on other sites
Gunter Severloh 4054 Posted May 4, 2020 Welcome to BI Forums Phantom_Fuzz! 5 hours ago, Phantom_Fuzz said: in-game command console? Are you referring to the bar at the bottom of the screen when your commanding your AI? Or the debug menu when you press escape? In general i would agree with POLPOX, but you can also edit each of your AI units special states and disable damage in the editor for your mission or add this allowdamage false; to each one of the init box's of the AI in your command. Is that about what your after? 2 Share this post Link to post Share on other sites
Joe98 91 Posted May 4, 2020 Please learn how to make any one man invincible. Test, test, test. Share this post Link to post Share on other sites
wogz187 1086 Posted May 5, 2020 @phantomfuzz, Quote Ai Squadron invincible through the in-game command console? You can paste this into the debug console, {_x allowDamage false} forEach units group player; or Paste this into the init properties field of any unit in the group, {_x allowDamage false} forEach units group this; Have fun! 2 Share this post Link to post Share on other sites
Phantom_Fuzz 1 Posted May 5, 2020 On 5/4/2020 at 7:12 AM, Gunter Severloh said: Welcome to BI Forums Phantom_Fuzz! Are you referring to the bar at the bottom of the screen when your commanding your AI? Or the debug menu when you press escape? In general i would agree with POLPOX, but you can also edit each of your AI units special states and disable damage in the editor for your mission or add this allowdamage false; to each one of the init box's of the AI in your command. Is that about what your after? Yes I am talking about the debug console, sorry for not clarifying. I'd like to be able to do it in-game since i'm doing gamemodes that i didn't make or edit. Share this post Link to post Share on other sites
Phantom_Fuzz 1 Posted May 5, 2020 7 hours ago, wogz187 said: @phantomfuzz, You can paste this into the debug console, {_x allowDamage false} forEach units group player; or Paste this into the init properties field of any unit in the group, {_x allowDamage false} forEach units group this; Have fun! Thank you very much! I'll try this out and tell you if it worked (Edit) It worked, thank all of you for the help. 1 Share this post Link to post Share on other sites
rainbow47 20 Posted April 25, 2022 I know this topic is a bit old but what command would I need to use to make my sqaud invincible but not the player? Share this post Link to post Share on other sites
sarogahtyp 1108 Posted April 25, 2022 Init field: { if !( isPlayer _x ) then { _x allowDamage false; }; } forEach units group this; Or debug console: { if !( isPlayer _x ) then { _x allowDamage false; }; } forEach units group player; 1 Share this post Link to post Share on other sites
rainbow47 20 Posted April 25, 2022 Somehow these are giving me errors. Share this post Link to post Share on other sites
sarogahtyp 1108 Posted April 25, 2022 Don't get toooooo specific... 2 Share this post Link to post Share on other sites
rainbow47 20 Posted April 25, 2022 I receive the following error: Error invalid numer in expression Share this post Link to post Share on other sites
sarogahtyp 1108 Posted April 25, 2022 try to write the whole thing manually instead of using copy and paste 1 Share this post Link to post Share on other sites
rainbow47 20 Posted April 25, 2022 Unfortunately still getting the same errror. Not sure what i am doing wrong. Share this post Link to post Share on other sites
froggyluv 2136 Posted April 25, 2022 56 minutes ago, rainbow47 said: Unfortunately still getting the same errror. Not sure what i am doing wrong. That above code is gonna work 100% the time unless you're somehow typing it wrong. At this point you'd have to post a pic or video of you typing that and showing the error to get any help Share this post Link to post Share on other sites
rainbow47 20 Posted April 25, 2022 Please find a picture here: https://ibb.co/8PD8pR0 Share this post Link to post Share on other sites
dreadedentity 278 Posted April 25, 2022 This was a weird one, took me a long time to figure out what was going on. First I tried retyping everything, which worked. Then I tried focusing on "_x allowDamage false" because that's where the error is happening. I went letter by letter and replaced every one, still getting the error. Then I noticed that if you are navigating the text via arrow keys, once you get to "e" in allowDamage, then you have to hit the arrow 3 times before the cursor advances to the space. Interesting...by default I "show all symbols" in notepad++ but I don't see any control characters...Finally the answer came to me. I changed the encoding to ANSI: { if !( isPlayer _x ) then { _x allowDamage false; }; } forEach units group this; So the short answer is retyping everything would have worked, or just retyping the contents of the Then code block, even more specifically just highlighting the "e[space]" in allowDamage false and retyping "e[space]" There is a long answer, but we really don't want to go into it, trust me. So the even shorter answer: Encoding is a bitch 2 Share this post Link to post Share on other sites
Harzach 2517 Posted April 25, 2022 7 minutes ago, dreadedentity said: This was a weird one, took me a long time to figure out what was going on. Any time you copy code from this forum, re-paste it into a code block to check for corrupt characters: Delete any red dots, re-copy, and you're done. 4 Share this post Link to post Share on other sites
sarogahtyp 1108 Posted April 25, 2022 @rainbow47 there was a reason for this: 2 hours ago, sarogahtyp said: try to write the whole thing manually instead of using copy and paste 3 Share this post Link to post Share on other sites
rainbow47 20 Posted April 25, 2022 My first approach to use my own script 😂 Thank you very much for your help guys. I've learnt a lot! Share this post Link to post Share on other sites
froggyluv 2136 Posted April 25, 2022 Man you learn something new here everyday 1 Share this post Link to post Share on other sites