daily pastebin goal
6%
SHARE
TWEET

OFP WW4mod force move AI on a small distance

Faguss Jun 9th, 2018 (edited) 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;;;;; Select.sqs
  2.  
  3.     _dir = (((getpos selection select 0) - (getpos SELECTED select 0)) atan2 ((getpos selection select 1) - (getpos SELECTED select 1)))
  4.     ? _dir < 0 : _dir=_dir+360
  5.     SELECTED setFormDir _dir
  6.    
  7.     ? SELECTED distance selection < 5.5 : _dir exec "Unit\ForceMove.sqs"
  8.     SELECTED move getpos selection
  9.  
  10. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  11.  
  12. ;;;;; ForceMove.sqs
  13.  
  14.     _unit = SELECTED
  15.     _dir = _this
  16.     _dist = _unit distance selection
  17.    
  18.  
  19.     @(getDir _unit)+2 > _dir && (getDir _unit)-2 < _dir
  20.     _unit move getpos _unit
  21.    
  22.     ? _dist < 1.5 : exit
  23.     ? _dist > 1.5 && _dist < 2.1 : _unit playMove "CombatWalkF"
  24.     ? _dist > 2.1 && _dist < 4 : _unit playMove "CombatRunF"
  25.     ? _dist > 4 && _dist < 5 : _unit playMove "CombatSprintF"; _unit playMove "CombatWalkF"
  26.     ? _dist > 5 : _unit playMove "CombatSprintF"; _unit playMove "CombatSprintF"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top