Graviteam
March 29, 2024, 02:10:49 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: ai_rotate (command sector)  (Read 3197 times)
0 Members and 1 Guest are viewing this topic.
lockie
Generalfeldmarschall
*****
Posts: 2348



« on: April 23, 2014, 12:10:19 PM »

I've discovered a useful hint how to force the unit to rotate on the requested angle.
As we know command ai_rotate works in a very strange manner, unit rotates always at the same angle and direction. But there is a catch. If u want to rotate the unit in appropriate direction, then u've to manipulate with contour orientation  Roll Eyes
Let's see on this picture. I need tank to see in the direction along "red arrow", then I've to set up manually the contour orientation according necessary direction. In my case the angle of the blue contour is -135 degrees.

The script will be the next:
Code:
ext, ai_stop;
ext, ai_defence, gbr_pos_01, 15, 1;
ext, ai_rotate, 180;
where
ai_stop - stop the unit movement
ai_defence - move and pick up pre-defined position gbr_pos_01(1 means distance, but seems it doesn't has effect at all)
ai_rotate - rotate (doesn't matter what the angle)
« Last Edit: April 23, 2014, 03:12:46 PM by lockie » Logged

Provocative signature removed
frinik
Generalfeldmarschall
*****
Posts: 3145


« Reply #1 on: April 23, 2014, 01:38:12 PM »

I have been using that feature in the ME and it's touch and go.Sometimes the AI will move according to the degrees of rotation that you entere sometimes not.

Are you positive your method is failsafe?
Logged
lockie
Generalfeldmarschall
*****
Posts: 2348



« Reply #2 on: April 23, 2014, 03:10:49 PM »

Are you positive your method is failsafe?
SF itself is not failsafe Smiley
Logged

Provocative signature removed
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Simple Audio Video Embedder
Valid XHTML 1.0! Valid CSS!