User Tools

Site Tools


4rpl:commands:getobjfacinganglecell

Differences

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

Link to this comparison view

Next revision
Previous revision
4rpl:commands:getobjfacinganglecell [2021/01/08 16:01] – created - external edit 127.0.0.14rpl:commands:getobjfacinganglecell [2025/02/14 14:57] (current) – external edit 127.0.0.1
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.1610121708.txt.gz · Last modified: 2025/02/14 14:56 (external edit)