Jump to content

Having units fire at stuff


Whodat

Recommended Posts

Hi all - I am using the MIST respawninZone command to put enemy troops on the map, but I also want them to be firing at some random point so there is tracers etc.

 

I was thinking that I needed a fire at point, but specifying an offset position from where they spawn in, but the getPosition command is returning 0. It also falls over if I use Group rather than Unit, but from reading about it I don't see why it would.

 

What am I doing wrong?

 

 

 

local unitPos = nil

 

unitPos = Unit.getByName('YC Group 1-2'):getPosition()

 

trigger.action.outText("Position is: "..unitPos.x.z,10)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...