Nemaconz Posted December 17, 2014 Report Share Posted December 17, 2014 Trying to get certain AI of mine to push people back if they get to close, but the script I wrote is not working, any script Gods here think they can lend a hand? _playerpresent = (position _aiunit) nearEntities ["Man", _wpradius]; _aiunit spawn { while {alive _this} do { _playerPresent = false; {if((isPlayer _x) && (_x distance _aiunit <= 20)) then {_playerPresent = true};}forEach playableUnits; while (_playerPresent) do {_x setVelocity [10,10,10];}; }; }; Link to comment Share on other sites More sharing options...
Question
Nemaconz
Trying to get certain AI of mine to push people back if they get to close, but the script I wrote is not working, any script Gods here think they can lend a hand?
_playerpresent = (position _aiunit) nearEntities ["Man", _wpradius];
_aiunit spawn {
while {alive _this} do
{
_playerPresent = false;
{if((isPlayer _x) && (_x distance _aiunit <= 20)) then {_playerPresent = true};}forEach playableUnits;
while (_playerPresent) do {_x setVelocity [10,10,10];};
};
};
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now