xrgallagher33xx 0 Posted August 8, 2021 Hello, Im working on a script right now thats got me up nights. basically, i want a blufor unit to follow any opfor unit that passes through its attached trigger. What ive got so far is this if ((side _x) == east) then { pc1 doFollow (side _unit); }; PC1 is the blufor unit This is obviously not working, the game tells me I am missing some variables here, which in every case it is correct. But I need it to follow ANY OPFOR unit that passes through the trigger, not just a specific unit so I am not quite sure about what variables I would need to use to describe any unit as opposed to one in specific. Any help would be extremely appreciated. Share this post Link to post Share on other sites
sarogahtyp 1104 Posted August 8, 2021 set trigger to NONE, OPFOR, PRESENT OnActivation: private _dummy = selectRandom thisList spawn { private _grp = group pc1; private _wp = _grp addWaypoint [position _this, 0]; _grp setCurrentWaypoint _wp; waitUntil { sleep 2; _wp setWaypointPosition [position _this, 0]; not alive pc1 or not alive _this }; }; tested, working... Share this post Link to post Share on other sites
xrgallagher33xx 0 Posted August 8, 2021 this isnt working for me, indicating invalid number in expression? Share this post Link to post Share on other sites
sarogahtyp 1104 Posted August 8, 2021 its working ... look for invisible characters inside the code. Thats a common forum bug Share this post Link to post Share on other sites
xrgallagher33xx 0 Posted August 8, 2021 so i was able to fix that by typing it all out, however im getting another error "missing ;" 'private _dummy = selectrandom this |#|list spawn {private _grp = group pc1; pr... Error Missing ; Share this post Link to post Share on other sites
xrgallagher33xx 0 Posted August 8, 2021 im not understanding where it wants an additional ";" because ive typed it out verbatim Share this post Link to post Share on other sites
xrgallagher33xx 0 Posted August 8, 2021 Hey i got it working thank you so much! Share this post Link to post Share on other sites