Mission vehicle saving

Mission vehicle saving

« posted: Oct 29, 2014, 02:43 PM »
Quick question, does the "mission vehicle saving" carry over more that one restart?
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Mission vehicle saving

« Reply #1 posted: Oct 29, 2014, 03:39 PM »
I experience it so yes. Why?

Re: Mission vehicle saving

« Reply #2 posted: Oct 29, 2014, 03:57 PM »
Not entirely sure but i think  and ill have to try again but i think they only saved for one restart, but then again i may have missed something, thanks.
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Mission vehicle saving

« Reply #3 posted: Oct 29, 2014, 05:06 PM »
Not entirely sure but i think  and ill have to try again but i think they only saved for one restart, but then again i may have missed something, thanks.
Seems to work on my test server?
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2610

Re: Mission vehicle saving

« Reply #4 posted: Oct 29, 2014, 07:01 PM »
I had an APC that was still there after about 24 hours and 12+ restarts.

Re: Mission vehicle saving

« Reply #5 posted: Oct 29, 2014, 07:55 PM »
Hmm, just tried it and i actually didnt restart, i saw it in the saves but after a while i disappeared in the save file, i checked it (the vehicle was still present in game, just not in the savefile anymore) for the "A3W_missionVehicle" variable which returned true, that i guess that is the condition it saves on?

Edit!
Ill test again but i think it was after a restart, the vehicle spawned as intended but then after a while it was removed from the save, but ill try it again and check =)
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2610

Re: Mission vehicle saving

« Reply #6 posted: Oct 29, 2014, 07:59 PM »
Did you implement vehicle locking in your version?

Re: Mission vehicle saving

« Reply #7 posted: Oct 29, 2014, 08:14 PM »
Yes but not on those vehicles

Can that be why?

Edit, oh yes, load saved vehicles locked and untowable, i guess that can make that happen.... sorry to bother you
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Mission vehicle saving

« Reply #8 posted: Oct 29, 2014, 08:26 PM »
Yes but not on those vehicles

Can that be why?
Locking only works on those vehicles after owner change with your scripts right? Atleast with the files you gave me.
So a mission vehicle cannot be affected by your scripts as it has a different variable.

Re: Mission vehicle saving

« Reply #9 posted: Oct 29, 2014, 08:52 PM »
Yeah, but i set

Code: [Select]
_veh lock 2; // Spawn the vehicle locked
_veh setVariable ["R3F_LOG_disabled",true,true]; // Spawn the vehicle untowable/liftable

When i load them in again i also added a "true"here in vLoad
Code: [Select]
{ _veh setVariable [_x select 0, _x select 1, true] } forEach _variables;

So something of that screws up the variable "A3W_missionVehicle" its not really i problem ifg  you use the changeOwner script that sets "A3W_purchasedVehicle" anyway but if you want to have mission vehicle saving on,
it spawns in the vehicle locked (but you can break in to it if you have a toolkit in my edit) but if you then after the restart, run it by the ownership thingy it disappears next restart.

So, i would like to know what screws up the "A3W_missionVehicle" variable (its still on the vehicle if i check) but its not being picked up by the save. But i as its my fault i don't want Rev to spend time on looking in to this.

Actually saving the mission vehicles for just one restart (in my case/edit) might be good, as players wont spam the whole map with forgotten mission vehicles =).

Now i want to figure out how to stop "town vehicles" from despawning if you leave then unattended.

Sorry Rev and thanks for the hint.
  • Offline LouD
  • Silent but deadly ;)
  • Moderator
  • Veteran
  • ******
  • Posts: 1415

Re: Mission vehicle saving

« Reply #10 posted: Oct 29, 2014, 09:19 PM »
I removed the spawn in locked and tow lines you added. Just tested it and mission vehicles spawn in perfect after a restart every time.

Since when do town vehicles despawn? Only if blown up right?
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2610

Re: Mission vehicle saving

« Reply #11 posted: Oct 30, 2014, 04:02 AM »
Since when do town vehicles despawn? Only if blown up right?

Ever since the beginning...

Re: Mission vehicle saving

« Reply #12 posted: Oct 30, 2014, 10:11 AM »
Town vehicles despawn (and respawn in town) if moved (maybe even if you took something from them) and left them unattended for i think 15 minutes, distance (player > vehicle) and towing is also taken into account.

Correct me if im wrong but towed vehicles get untowed before despawn right?
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2610

Re: Mission vehicle saving

« Reply #13 posted: Oct 30, 2014, 10:15 AM »
Towed vehicles have their respawning script frozen until not being towed anymore.

Re: Mission vehicle saving

« Reply #14 posted: Oct 30, 2014, 10:22 AM »
Thanks for the info Rev