Jump to content
Sign in to follow this  
yokai134

Problem with 2D Editor and positions not being equal when a script is ran

Recommended Posts

I have been currently working on a mission in the 2D editor and been having some problems with a script and positions.

On the map in the editor I have multiple logic units (logic locations) grouped to a central unit (logic cities/depots/airports). In one of my scripts I have it create units at each of the units' positions. The problem is it either wont create them or wont place them where the currently selected unit in the group is.

For instance from the SQM I have a logic location

position[]={8896.167,265.38239,5263.6489};

However when I run the mission and have a hint tell me the position it will report the X is 9021 and the Y is 5350 (vertically its still 0) and not what they should be from their exact position when they're placed such as the position above.

If I create the same mission in the 3D editor it will create the units correctly at the correct location but the 3D editor will sometimes run my scripts multiple times when called only once and I dont have really any additional buildings and such hence using the 2D editor.

Nothing in any script moves any objects from its spawn nor do any of the units have placement radius greater than 0.

I am unsure of why this is happening and tried to search for anything related to it but to no avail (hence the newly created account as my last resort for finding the solution to this problem). If there is a solution to this please point me in the right direction.

If any one can explain why this is happening I would be very grateful and if more info is needed please let me know.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×