User Tools

Site Tools


4rpl:commands:getobjfacinganglecell

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

4rpl:commands:getobjfacinganglecell [2021/01/08 11:01] – created - external edit 127.0.0.14rpl:commands:getobjfacinganglecell [2024/02/18 15:11] (current) – Added preset. Vertu
Line 15: Line 15:
 <code 4rpl> <code 4rpl>
 GetObjFacingAngleCell(self "Barrel" 42 1) GetObjFacingAngleCell(self "Barrel" 42 1)
 +</code>
 +<code 4rpl>
 +#--Aiming at target:
 +RotateObjTowardsCell(self "AXLE" <-targetPos.x <-targetPos.z <-AXLE_ROT_SPEED)
 +if(GetObjFacingAngleCell(self "AXLE" <-targetPos.x <-targetPos.z) lt(0.5))
 + RotateObjTowards(self "TURRET" <-targetPos<-TURRET_ROT_SPEED)
 + if(GetObjFacingAngle(self "TURRET" <-targetPos) lt(0.5))
 + @fire
 + endif
 +endif
 </code> </code>
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
  
4rpl/commands/getobjfacinganglecell.txt · Last modified: 2024/02/18 15:11 by Vertu