Jump to content

Coordinates question


Recommended Posts

I am working on a mission that would spawn at specific places around the map. I'm going to create an array of spawn coordinates based on the locations where I want this specific mission to spawn and put it in DZMS's config file. My question is regarding the coordinates and objects relative to the mission spawn point.

 

For example:

[[(_coords select 0) - 0.5635,(_coords select 1) + 0.3173,0],3,1,"DZMSUnitsMajor"] call DZMSAISpawn;

I understand that the -0.5635 and +0.3173 cause those items/AI to spawn at a point away from the exact center of the mission spawn. My question is how you figure this out? With the mission I am working on, in addition to the AI spawning, I'd want other stuff to spawn around them, but I need to know how to figure out where these items will spawn. I also need to know if there's a way to ensure they don't spawn inside of other objects. This mission won't spawn in an open field like the current missions.

Link to comment
Share on other sites

All the major and minor missions were made in the editor. The position of a flag pole in the center was used as the reference point to offset the coordinates from.

 

So if you placed the center at 10000,10000, then placed items to the side at 9995 and 10005, it would be like this?

[[(_coords select 0) - 0.5,(_coords select 1) + 0.5],3,1,"DZMSUnitsMajor"] call DZMSAISpawn;
Link to comment
Share on other sites

Thanks for the replies. What about the other half of my question? Is there a way to make sure the items you spawn won't be where other objects are?

 

No there isn't. Some objects when they spawn in detect they are colliding with another object and move themselves away, but there is no command to check if the objects are colliding.

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...