shadow 6 Posted July 30, 2002 How do I save the player's inventory from one mission to the next? you know... like the resistance campaign. and also if a player has stolen a certain vehicle. How do I save that vehicle over to the next mission aswell ? Share this post Link to post Share on other sites
LauryThorn 0 Posted July 30, 2002 Perhaps you should ask Samson, he boasted that in his campaign, once you've picked up a weapon, it stays throughout the campaign. Perhaps you could save the weapons name and then in next mission check what it was, but I'm not sure.. Share this post Link to post Share on other sites
Sam Samson 0 Posted July 30, 2002 use the savevar command. close to the end of the mission run a script (call it weaponcheck.sqs?) that looks something like this: ? player hasweapon "hk": gun="hk"; savevar "gun" exit in the next mission's init.sqs strip the dude of his arms and rearm him with the gun he had in the last mission. you realize that I did this in the old ofp, not in R. I didn't get to study R too much yet. looks interesting, but I'm messing with a command engine that allows you to command all units of your side on the entire island. (don't think foraging for arms is sooo interesting. (I like tactics)). Share this post Link to post Share on other sites
crashdome 3 Posted July 31, 2002 If you are using Resistance (not sure if this command works in 1.46 or earlier) use the savestatus command. _myguy=player savestatus "Somename" An object.sav file will be created that warehouses the weapons, ammo, and health of the unit specified. If you also use the saveidentity command it will save face textures, name, etc... also. There are also new weaponpool commands I have yet to get to, but they will create a file that warehouses all the weapons you get to choose from in the breifing screen. Share this post Link to post Share on other sites
shadow 6 Posted July 31, 2002 Thanks for the tips, guys How do I load the "result" in the script in the beginning of the next mission? fillweaponfrompool? fillmagazinefrompool? Share this post Link to post Share on other sites
Sam Samson 0 Posted July 31, 2002 put this into your following missions init.sqs: (after you saved "gun" into the campaign space by previously saving it like I said above.) removeallweapons player; ? gun=="m21": player addmagazine "m21"; player addmagazine "m21"; ? gun=="hk": player addmagazine "hk"; player addmagazine "hk"; ... player addweapon gun ... Share this post Link to post Share on other sites
shadow 6 Posted July 31, 2002 You sure there are no simpler way of doing this stuff, Sam? What I am looking for is a completely dynamic inventory-content. Just like the OFP:R campaign Share this post Link to post Share on other sites
shadow 6 Posted July 31, 2002 I tried doing it the way you did , Sam. It don't give me enough flexibility. Its alot of work just to name every single weapon in the game and it does'nt count the amount of ammo the player has I got an error-msg on the savevar-thingy , CrashDome Share this post Link to post Share on other sites
Sam Samson 0 Posted July 31, 2002 you bet it is a lot of drudgery and unfancy footwork like I said: now that we have R I'm sure there is a simpler way. I didn't study R yet though, so I can't tell you anything about it. why don't you get yourself a depbo.doulibob and slice the R campaign open to investigate how bis did it? it'll remain work any way you dice it. Share this post Link to post Share on other sites
shadow 6 Posted July 31, 2002 Yeah, I'll see if I can find that new DePBO-util someone made that supports the Resistance-pbo's Share this post Link to post Share on other sites
shadow 6 Posted July 31, 2002 I finally got the loadstatus and savestatus to work It seems that that those commands can only be executed by a script and not in a trigger...strange.... Share this post Link to post Share on other sites