Cool. Thanks man. It's weird that the script actually still half works if respawnonstart = 0 is required. I'll give it a go and link the Dropbox file if it's still giving me fits. Thanks a ton.
Cool. Thanks man. It's weird that the script actually still half works if respawnonstart = 0 is required. I'll give it a go and link the Dropbox file if it's still giving me fits. Thanks a ton.
The script in this thread is definitely not working for me. Same deal. F2 and F3 AI slots still always spawn at base. F4, F5 and F6 slots do spawn with me where I last saved. Strange. Spyder sent me this and it does seem to "fix the problem" in the one test I ran:
waituntil {(player getvariable ["alive_sys_player_playerloaded",false])}; sleep 10; { if !(isPlayer _x) then { if !(_x getVariable ["Persistent_Teleport", false]) then { _x setPos (getPos player); _x setVariable ["Persistent_Teleport", true, true]; sleep .5; }; }; } forEach units group player;
So I guess that's good. But my gear is still not saving even with respawnOnStart = 0
Here's my mission PBO. I'd love for someone to take a look at it for me to see if I missed anything. If my required mods are needed, I also included a readme:
https://www.dropbox.com/s/vmuwi6rnie5n8u9/Reshmaan_Province_Afghanistan.pbo?dl=0
Does the same thing happen with vanilla?
Vanilla? What's that? :)
I haven't tried man. I definitely can. It just seems the people in this thread that use the script and respawn settings I do use a decent amount of mods too. And me being new to all this, I'm leaning towards it being a "me setting things up wrong" issue rather than a mod conflict.
Just to elaborate on that, I had a look at your files and I can't see anything wrong with them. I've got the same ones in a mission I'm running with virtually no differences and it works fine. The only thing I can think of is some mod somewhere messing about with the loading times or something in the mission itself. So two tests:
1. Run without mods.
2. Create a different, simple, unmodded ALiVE mission with all the persistence stuff set up properly, test that, make sure it works, then try it again with the scripts added in.
If you've already done that then let me know the results! I can try to send you a template I've made with those scripts and you can see if it works on your setup.
So just to be clear, your exact loadout that you saved with loads when you continue your mission? Everything from your helmet to ammo to guns and grenades are all at the values they were saved at? I just want to make sure what I'm expecting to load with me when I continue a mission is what's supposed to happen with ALiVE persistence.
I'm also surprised all your AI units spawn with you on mission load too with the script in this thread. The only one that has ever worked for me was with the one test I did last night with Spyder's script adjustments I just posted. But then again, the one posted further up has worked but fails I'd say around 80% of the time so maybe this one will too. Something fishy must definitely be going on with one of my mods then, especially if you think the scripts I'm using look clean.
If you have a template you think may be worth me testing, I'll definitely try it. Otherwise I can try a vanilla Altis one with no scripts and test this stuff one by one. I'd like to get this sorted out because I'm thinking of releasing this. Just have to get these bugs ironed out.
I don't really have an unmodded mission to throw your way, but yes, everything loads as I left it for me. No issues. I imagine it would be a mods issue.
Have you ever tried 3CB at all?
And I have almost every mod imaginable. I doubt you could send anything my way that I couldn't immediately play. I'd love to take a test run on one on my server and see how server saving and exit works for me and see where it leaves me on mission load.
Yup but not with ALiVE. Can't imagine it would be that though.
Yeah. Just grasping at straws here. I'll try a vanilla one and see where it leaves me. If you have anything you know is working will all/most of these scripts I'd definitely like to try it on my server too (it would save me time from having to set something up), but no worries if you don't send one. Thanks for looking at the scripts for me.
It seems like I may actually have some report errors going on. Davidoss from BIS forums just generated a report for me using the same mission I linked above and he's right, there is alot of errors. I'll share this in the Intel script thread as well because I'd have to imagine I wouldn't be the only one getting this error spam from it (it's not the only one causing errors, mind you).
Whether it's the source of my teleport issues too I obviously can't say without trying vanilla but I figured it would be worth sharing with you guys.
Just a heads up to anyone using this. With the Eden Editor, I think this script conflicts with the new option to right click on the player in the editor and change their gear via the Virtual Arsenal. The player initially does load their stored gear on mission start for a *split second*, but when the AI teleport in, most of the gear reverts to default. That's too bad. If anyone knows a way around this that would be much appreciated.
So your gear, persisted from a previously saved game, was overwritten (after being equipped) by default gear?
Might be an issue with ALIVE persistence post update
@SpyderBlack723 So your gear, persisted from a previously saved game, was overwritten (after being equipped) by default gear?
Might be an issue with ALIVE persistence post update
No. This happens on mission start in the SP editor (I mean it also happens on mission start on my server too and also when I use a persisted save. It happens any time I start the mission with any method I choose). I've set my playable guy to load my gear from the Virtual Arsenal in Eden (right click on player, load Virtual Arsenal gear). The second the mission starts or is continued with persistence, my guy is wearing the correct Virtual Arsenal gear. However, a second later when my AI teammates teleport in, my gear reverts back to the default 3CB EOD Day Patrol stuff.
I *think* I know what the problem with gear is. Can someone smarter than me humor me for a second?
When this script is running, are all units (the playable units and AI teammates) technically "respawning" even on mission start? If so, I think this would explain it: https://forums.bistudio.com/topic/188187-eden-retain-custom-spawn-loadouts-after-respawn/
I definitely feel like the AI is respawning but I can't tell if the playable unit is.
If that sounds like what's happening here, do you think R3vo's onPlayerRespawn.sqf and onPlayerKilled.sqf adjustments would work (and play nice with this script in this thread?)?
Quote:
onPlayerRespawn.sqf
[player, [missionNamespace, "inventory_var"]] call BIS_fnc_loadInventory;
onPlayerKilled.sqf
[player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory;
Could be.. . check the description.ext file for this setting - respawnOnStart
respawnOnStart = 1; //Respawn on start. Run respawn script on start.
respawnOnStart = 0; //Dont respawn on start. Run respawn script on start.
respawnOnStart = -1; //Dont respawn on start. Don't run respawn script on start.
https://community.bistudio.com/wiki/Description.ext#respawnOnStart
I'll check. Pretty sure I removed respawnonstart = -1 since I use save player location in the ALiVE Data module. Should I put it back in and try the new adjustments I posted?
This should probably be a question for R3vo but does "missionNamespace" need to be my mission name? So for example, Takistan_Mission.Takistan or what have you?
Yeah I would try putting it back and test.
missionNamespace is like a place to store variables for that mission only - once the mission stops you lose anything stored there.. KK has a good description:
Mission namespace is the main default partition that exists from the moment you load the mission to moment the current mission ends. All variables defined in mission namespace will cease to exist when you are back in the lobby. If you want your variables exist longer you can use different namespaces
edit: and to actually answer your question - no you would use 'missionNamespace' not your actual mission name
So I didn't try the edits R3vo mentioned but the same thing with my correct gear appearing temporarily and then reverting back to default happens with -1 and 0 (which is what it was originally at, I just checked) for respawnOnStart.
In the editor, I ungrouped my AI teammates from me just to test and it works completely fine when I do that. My Arsenal gear loads perfectly when I start the mission alone and ungrouped.
I'm going to stick by the theory that this script treats all players as if they're respawning when grouped on even on mission start.
I'll try R3vo's adjustments at some point. I have a feeling it will work correctly when I do that. Just a guess but it seems logical.
Why BIS gives us an option to load custom gear and then reverts us when respawning is sort of stupid.