Jump to content

Can I Spawn a Unit at a Specified BRA from Player?


Recommended Posts

Posted

Hi folks!

 

I've been playing around with spawning units in via MIST, and it's pretty fun!

 

Here's the situation I want to create: Once a certain flag condition is met, I want two MiG-29s to spawn at a certain BRA from the player. Is that possible? I can't seem to find any documentation to spawn something in a location referenced to an object other than inside a zone.

 

Thanks in advance,

 

Sedlo

Posted

Gotta remember back to math class and do some trig.

 

The basics is something like this:

 

{x = math.cos(theta)*dist+ point.x, y = math.sin(theta)*dist+ point.z}

 

theta being the bearing in radians (can math.rad() it)

dist being the range value in meters

point being the current position of the player.

 

That will give you the x/y coordinates to place a new group at.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • Recently Browsing   0 members

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