Rosso777 22 Posted March 3, 2021 Here is the original script set for a player model, but how would I mod it to also apply to an AI? if(isTouchingGround player && alive player && _curpos select 2 < 1)then { _nearestObjects = nearestObjects [player, ['Exile_Construction_Abstract_Static','AbstractConstruction','Exile_Construction_Flag_Static'], 2.8]; if(_nearestObjects isEqualTo [])then { _last_no_glitch_pos = _curpos; _last_no_glitch_vectorDir = vectorDir player; _last_no_glitch_vectorUp = vectorUp player; }; }; Share this post Link to post Share on other sites
Rosso777 22 Posted March 3, 2021 It’s not as easy as changing “player” to “CAmanbase”, right? Share this post Link to post Share on other sites
pierremgi 4634 Posted March 3, 2021 5 hours ago, Rosso777 said: It’s not as easy as changing “player” to “CAmanbase”, right? No. Player is an object. "CAManBase" a string (class) used as kind of object. You need to define on which units you want to apply the code. Share this post Link to post Share on other sites
Rosso777 22 Posted March 3, 2021 6 minutes ago, pierremgi said: You need to define on which units you want to apply the code. Do you mean OPFOR, East, West, etc.? Or specifically naming units (unit1, unit2), etc.? - If this were the case, I am not sure how I would do that using a dynamic AI spawner like A3XAI. Share this post Link to post Share on other sites
pierremgi 4634 Posted March 3, 2021 You should learn the basics of scripting. You can't mix side, objects, strings, arrays,... https://community.bistudio.com/wiki/Category:Data_Types So, for each command, learn the syntax. Start with isTouchingGround https://community.bistudio.com/wiki/Category:Arma_3:_Scripting_Commands Share this post Link to post Share on other sites
Rosso777 22 Posted March 4, 2021 23 hours ago, pierremgi said: You should learn the basics of scripting. You can't mix side, objects, strings, arrays,... Yes, I know you are right. I need to slow down and stop getting ahead of myself; taking on projects that are much too big for me as a newbie. @wogz187 has been telling me the same thing but I've been much too excited to stop reverse-engineering things. I need to slow down, for sure. 1 1 Share this post Link to post Share on other sites