<- CRPL reference <- Utility Commands

CreateIndicatorArrow

ArgumentsResultNotation
Arrow name, screen coordinates s1 i1 i2 –

Description

Creates a super cool floating green arrow that points at stuff. Useful for creating tutorials and such.

Examples

#example1:
#poll the mouse position
GetMouseScreenPixelPosition ->mY2 ->mX2
#check to see if the mouse has moved
<-mX2 <-mX neq <-mY2 <-mY neq or if
  #destroy the old arrow
  "ThatIsTheMouse" DestroyIndicatorArrow
  #remember the mouse position
  <-mY2 ->mY
  <-mX2 ->mX
  #annoyingly point at the user's mouse
  "ThatIsTheMouse" <-mX 20 sub <-mY 10 sub CreateIndicatorArrow
endif

#example2:
#poll the camera position
8.0 GetCameraZoom 4 add div ->sZ2
GetCameraPosition ->sY2 ->sX2
#check to see if the camera moved
<-sX2 <-sX neq <-sY2 <-sY neq or <-sZ2 <-sZ neq or if
  #destroy the old arrow
  "ThatIsMe" DestroyIndicatorArrow
  #remember the camera position
  <-sX2 ->sX
  <-sY2 ->sY
  <-sZ2 ->sZ
  #Find what we are pointing at
  CurrentCoords CellToPixel ->y ->x
  #point at the core containing this script
  "ThatIsMe"
      <-x <-sX sub <-sZ mul ScreenWidth 2 div add 20 sub
      <-y <-sY sub <-sZ mul ScreenHeight 2 div add
      CreateIndicatorArrow
endif