Jump to content
xrgallagher33xx

Howto get Blufor unit to follow Opfor unit passing through trigger.

Recommended Posts

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

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

its working ...

look for invisible characters inside the code. Thats a common forum bug

Share this post


Link to post
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×