DayZ Mission System

They shouldn't explode or despawn if you setup theserver_updateobject.sqf and the server_cleanup.fsm correctly.


Hmmm i did put both pices of code in tho i think.. atleast they are there when i check xD
Maybe i did it wrong then ? just never had a problem until now.

server_cleanup
server_updateObject


Edit: Can this maybe be caused by this variable missing in some of the files? example Medical Outpost SM2.sqf? of Lazyink's latest.

_uralcrash setVariable ["Mission",1,true];
 
Hey guys, I'm updating my server with this, I've got lazylinks latest files however I have 1 question. I'm not running sargs ai but I do run animates crash sites and the an2 cargo drops on my server.

In my current server _clean.fsm I have the following:

Code:
if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"" && (vehicle _x getVariable [""Sarge"",0] != 1)) then {" \n

but in Kekies instructions the line reads:

Code:
if(vehicle _x != _x && (vehicle _x getVariable [""Mission"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n

What do I need to do with that line? Do I have to edit or change anything to Sarge in lazylinks files?

Any help would be great and thanks

Kind regards

Mac
 
My instructions are just copied from the github xD

And u might be using something that requires that sarge variable since its there. someone put it there? so just change it accordingly to the original post? test it out :)

Code:
IF YOU HAVE SARGE AI INSTALLED YOU NEED TO CHANGE THE VEHICLE VARIABLE IN EACH MISSION TO "SARGE" INSTEAD OF USING "MISSIONS" (Not tested with SARGE AI, may be incompatible.)

"i think" it would look something like this in mission files

_humveecrash setVariable ["Mission",1,true]; to like _humveecrash setVariable ["Sarge",1,true]; Or
_uralcrash setVariable ["Mission",1,true]; and _uralcrash setVariable ["Sarge",1,true];

i cant say if that will work but im just trying to help as TheSzerdi said it havent been tested and my be incompatible. xD
 
Yeah so i've been testing this for an hour. havent had any car killing me and they dont despawn. so for the code to actually be able to use the "mission" variable we put inside "server_cleanup.sql" we have to define the hummer's as a mission vehicle dont we?.

Next question is.. may this be why some of the ammo crates are not showing up as they should? also some buildings dont show up and i dont recive errors in my rpt about them not spawning. maybe the server removes them after spawn??

Anyway here is the fix for anyone else that may need it. red part=fix and green part=important but some of the missions use another variable name or 2 vehicles/boxes i'll show in example 2.

Example 1 most common:

_hummer = createVehicle ["HMMWV_DZ",[(_coords select 0) + 10, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_hummer setVariable ["Mission",1,true];

Example 2 with this one actually one of the humvee's would still blow up / despawn after i added the setvariable dont know why:

_baserunover3 = createVehicle ["HMMWV_DZ",[(_coords select 0) + 10, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_baserunover3 = createVehicle ["HMMWV_DZ",[(_coords select 0) + 15, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];

_baserunover3 setVariable ["Mission",1,true];

Edit: So what i had to do was this:

_hummer1 = createVehicle ["HMMWV_DZ",[(_coords select 0) + 10, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_hummer1 setVariable ["Mission",1,true];

_hummer2 = createVehicle ["HMMWV_DZ",[(_coords select 0) + 15, (_coords select 1) - 5,0],[], 0, "CAN_COLLIDE"];
_hummer2 setVariable ["Mission",1,true];




I dont know if this can be done like this "_hummer1 _hummer2 setVariable ["Mission",1,true];" maybe you do? =)

This is comming from a guy that dont know anything about scripts but this works for me. so i hope it helps someone else aswell..

Also im sure some of the other variables needs a look over if this is the cause of problems i dont know much about variables and the restrictions that may apply but im sure someone knows how to fix this completely xD

EDIT:: these boxes are too random. sometimes they show sometimes they dont -.-

// Thanks ibastavd you made me see this xD
 
Ive had the same problems with the Weapon crates.

another thing, is there any other syntax we can use for the actual messages? like sidechat or global even.
 
I have tested out 3 different missions and no weapon crates or medical crates have spawned in at any of them, is there something i could be missing or anyone else having the same issues? Also I managed to stop the cras blowing up but instead they now just disappear after entering them. Would it work if i just put a // in front of each line thats spawns a vehicle in?

Thanks
 
I have tested out 3 different missions and no weapon crates or medical crates have spawned in at any of them, is there something i could be missing or anyone else having the same issues? Also I managed to stop the cras blowing up but instead they now just disappear after entering them. Would it work if i just put a // in front of each line thats spawns a vehicle in?

Thanks


Did you remember to put in
Code:
if(vehicle _x != _x && (vehicle _x getVariable [""Mission"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
And are you using SargeAI? or any other things that uses Sarge variable? The crates are quite bugged but that would not explain the vehicles.
 
Did you remember to put in
Code:
if(vehicle _x != _x && (vehicle _x getVariable [""Mission"",0] != 1) && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
And are you using SargeAI? or any other things that uses Sarge variable? The crates are quite bugged but that would not explain the vehicles.


I am using Morox simple AI and that does use the Sarge part, i did change all vehicles to say Sarge and not mission in the variable part. The vehicles are ok and for me not important to spawn in so I dont mind just // them out. The crates is just the issue really,

Thanks
 
Allright Dambi, i would love to find a solution for those crates but i just dont recive any erros and they spawn fine 50% of the time. i dont know whats wrong. maybe ink or TheSzerdi knows.
 
I have found that the crates spawn is most of the time, but they do disappear after a time, which is something I don't really mind, but I will look into it more..
 
Everything is looking good so far here but two questions, how do I esit the time inbetween missions? Ao i can make them less frequent and also are the vehicles supposed to save to the database or is there a way to change that?
 
Updated my github. Mission markers now show on relog. Credit to Falcyn for this.

Mission vehicles are not supposed to save to database. Doing so would be a major pain in the ass.

Time between missions can be set here: _wait = [2000,650] call fnc_hTime;
First number is maximum seconds till spawn. Second number is minimum seconds till spawn.

Edit to add: I've had no problems with crates not spawning, but adding the variable "Mission" or "Sarge" to them should fix it. Ex: box setVariable ["Mission",1,true];
 
The update adds addmarkers.sqf addmarkers75.sqf remmarkers.sqf remmarkers75.sqf smgomajor.sqf smgominor.sqf and makes changes in ALL sm#.sqf files. Make sure the debug folder is in your MISSION pbo, not the server pbo.
 
I have put the debug stuff into the server.pbo and changed the paths (wanted to keep everything in the same folder). Seems to be working still. Is there a specific reason you put it in the mission.pbo?
 
I have double checked and they are in the mission as you said.

Any other ideas? They do work, just not after a relog or someone logging in after the mission has begun
 
Back
Top