Mission not finished & jumping boxes
Closed this issue · 14 comments
Hey there.
We are currently testing DMS on our exile test server. (DMS_DEBUG = true;)
Everything is on default settings except _AICount, we've set this to 20.
While testing, we had a strange bug. We killed all AI's but the mission did not finished.
After about 10sec. the loot box just jumped away. Every jump about 5-10m.
After a few jumps the box completly disappeared.
The mission never finished, even after 5min. the mission was still active.
I dont know if this is a problem with debug mode, but if i'm not wrong, they should get a timeout after 5-6min.?
Another question is about the missions. Is there any way to implement buildings/vehicles into the missions? We've created a few bandit camps in the editor, would be awesome to use them! :)
Sorry for my bad english, i hope its not to hard to understand.
//edit:
After a few more tests one of the bots dropped his launcher, i checked the config and found DMS_ai_remove_launchers and its set to true. I still dont know if all the settings are the same for the debug more, if not there seems to be a problem with removing the launcher.
Are you sure you're using the latest version?
Yes, just downloaded everything from this github.
Noticed. I will make a few fixes for that soon.
Do you have the server RPT from this event? If so, can you please provide it?
What other scripts were you running with the mission? Do you have infiSTAR enabled?
Also, you can create a new mission by copying one of our current ones, and simply adding the building spawn script to them. Don't forget to add them to the cleanup (if you want them to be cleaned up).
No i dont have the rpt anymore, sorry. If i got the problem again i will upload the rpt!
Custom scripts are a briefing, a simple welcome script and player/group markers.
Yes we have infiStar enabled, could this be a problem with DMS?
For the buildings, what kind of building spawn script would be the best? The simple script thats provided by m3editor (like the stuff in iniServer.sqf)? Or something different?
I think the best would be to use the relative position, but how would i spawn the buildings?
Where would i need to call this to clean up everything?
I just checked the latest version of infiSTAR (v0004b) and that should not have caused the crate issue. I'd say just forget about it unless it happens again... in which case, please try to reproduce it WITH DMS_DEBUG enabled :)
If you want dynamic buildings, then relative position is the way to go, otherwise static (absolute) positions would work.
I have no experience with M3Editor, but I'm sure that if it outputs an array or code for spawning the buildings, you can simply put that array or code into a new mission file, add that mission file name to "DMS_MissionTypes", and it should be selected.
As for cleanup, simply assign the buildings to a variable and add it to index 0 of the _missionObjs array (refer to existing missions to see what I'm talking about if you're not sure) :)
We'bve done many tests and for now this does not happened again, we will see.. :P
With m3editor you get something like this:
["Land_BagFence_Long_F",[4004.68,3994.74,0.786207],0,0,0,false],
["Land_BagFence_Long_F",[4007.6,3994.74,0.786207],0,0,0,false],
["Land_BagFence_Long_F",[4006.15,3989.04,0],0,0,0,false],
["Land_BagFence_Long_F",[4006.09,3989.04,0.786207],0,0,0,false],
["Land_BagFence_Round_F",[4006.19,3987.13,0],0,0,0,false]
But its also possible to get the relative position:
["Land_BagFence_Long_F",[1.74243,2.83789,0.785207],0]
["Land_BagFence_Long_F",[4.66504,2.83789,0.785207],0]
["Land_BagFence_Long_F",[3.21143,-2.85498,-0.000999928],0]
["Land_BagFence_Long_F",[3.15479,-2.85718,0.785207],0]
["Land_BagFence_Round_F",[3.22803,-5.10815,-0.00130129],0]
I think the first code would not work because the missions are always at different locations, the second part should work, but i dont know how/where to call it inside of a new mission.
Could you maybe give me an small example how to do this? :/
Check this for some sample code:
http://pastebin.com/tEeLLqMU
Create a new mission following the steps above, put that in after _pos is defined, and don't forget to define _missionObjs using _objArray ;)
So we tested everything and almost everything seems to work fine.
Its spawning the buildings and its removing the buildings on mission cleanup.
But there are two problems for now.
It seems like for some reasons its not using the direction of the buildings, everything spawns in one direction, even if set correct in the editor.
Screenshots:
http://imgur.com/a/pigxM
The other problem is the position of the AI.
Is there any way to not spawn all the bots at one position?
Like spawn every bot on a exact position to fill the buildings (like towers) for the mission?
And how about static MG's, any way to get them used by the bots?
Thank you for your help! :)
The relative position export you provided did not include direction... if you can export it as the third element in the array, then you could do a simple "_obj setDir (_x select 2);" after the object is spawned.
If you want to position the AI in the buildings, you'll have to find the relative positions and then use DMS_SpawnAISoldier. Make sure to read through the function definition to see how you're supposed to use it.
You can always createVehicle a static turret, spawn an AI, then use the "moveingunner" command to move the unit into the turret. However, we will be coming out with an "official" function for static AI soon :)
["Land_BagBunker_Large_F",[-3.60059,-1.97705,-0.193588],0],
["Land_BagFence_Long_F",[-4.25195,2.52563,0.0164804],270.909],
["Land_BagFence_Long_F",[-4.25195,2.52563,0.823638],270.909]
The relative position has a direction, its the last part of that stuff.
0 for the first object, 270.909 for the other two objects.
Same for the code above, just that all the objects above are facing direction 0.
So to use this i just have to add "_obj setDir (_x select 2);"?
Cant test it atm, but will test it later.
For the AI, i will take a look at the function, i hope its not to hard because i'm still learning.. :P
For the static turret, is there any eta about that? Would be sad if we would go to play around with the current situation and in 1 or 2 days everything gets changed, but would also be sad if we wait and it needs like 2 weeks or more.. :/
Yes, add that line above "_obj setPosATL _npos;"
I tried to document DMS_SpawnAISoldier as best as I could... If you need any help, refer to DMS_SpawnAIGroup as well.
As for ETA, I can't give you a definite answer... I could say "I'm gonna start working on it tomorrow", and then I'd forget about it :P
I can however tell you that it won't be a significant change... it will be as simple as creating a new function, and then simply calling that function in the mission file. Once it's added, you won't need to change anything. :)
Ok so we spend a little bit more time into testing.
"_obj setDir (_x select 2);" seems to work! :)
For now we had no time to test the DMS_SpawnAISoldier but we will test this soon.
Currently we have 2 questions about the spawn locations.
Some of our missions are just spawning a few buildings, thats working great.
But some of our missions are spawning something like a closed base.
The problem now is the random position that gets used for missions.
I know that DMS_findSafePos is used to do that, but is there any way to use another option?
Like an array with coords?
for example:
inside of the mission.sqf:
DMS_RandomPosition = 1; // 0 = random position | 1 = use position array
positions =
[
[4006.19,3987.13,0],
[2380.47,22267.8,0],
[7950.10,9667.10,0]
]
It would be awesome if some missions could use DMS_findSafePos and some missions would just use an random position out of an array, that way we could fix the problem that bases are almost broken when spawned on the side of a mountain or on rough terrain.
The other question is about the crate. It seems like the crate is not exactly on _pos.
We created something like a labyrinth and we want the crate at the end.
We spawned all the objects and buildings at a relative position to the end point, but the crate is not at the end point, it spawns like 10-15m away, always at the same location.
Is there any way to get the exact position so we can get the crate at the correct position?
You don't have to use "DMS_findSafePos" for every mission :)
For example, if you want to use that array of positions, simply define it at the top, then just use
_pos = _positions call BIS_fnc_SelectRandom;
As for the crate issue, simple call "DMS_SpawnCrate" using the relative _pos instead of the mission _pos.