Mission variables
Posted: Mon Nov 15, 2010 5:02 pm
I'm dabbling about in writing my own oxps now, or at least, trying to familiarize myself with the way that Oolite works.
From what I can tell, the only way to get a variable that lasts longer after Oolite shuts down is to save it as a mission variable in the save game.
I may be being rather dense, but I can't work out how to create one. I've trawled through the wiki pages, and had a nosey in the other oxps on my computer, but my poor brain's beginning to melt. I've probably seen it half a dozen times by now, but I haven't yet recognised it or been able to reproduce it.
Can anyone tell me how to create one? Or give me an example where upon docking at, say, "My new Station", it saves a variable saying "HAS DOCKED"?
I eventually managed to create a station today. There's something very satisfying about telling it to spawn in the console and seeing it appear in nearby space, and having something come up in the Advanced Space Compass! Even if it looks identical to a lowly Rock Hermit! And especially after one spent over an hour trying to work out why one's supposedly perfectly valid code refused to parse, and the problem is finally solved by copying and pasting it a few lines at a time until one finds the lack of a / in an </key>!
(Mastering Wings to get something that looks useable is proving tricky at the moment, so I'm persevering and dabbling in the scripting side of things while I get to grips with it!)
From what I can tell, the only way to get a variable that lasts longer after Oolite shuts down is to save it as a mission variable in the save game.
I may be being rather dense, but I can't work out how to create one. I've trawled through the wiki pages, and had a nosey in the other oxps on my computer, but my poor brain's beginning to melt. I've probably seen it half a dozen times by now, but I haven't yet recognised it or been able to reproduce it.
Can anyone tell me how to create one? Or give me an example where upon docking at, say, "My new Station", it saves a variable saying "HAS DOCKED"?
I eventually managed to create a station today. There's something very satisfying about telling it to spawn in the console and seeing it appear in nearby space, and having something come up in the Advanced Space Compass! Even if it looks identical to a lowly Rock Hermit! And especially after one spent over an hour trying to work out why one's supposedly perfectly valid code refused to parse, and the problem is finally solved by copying and pasting it a few lines at a time until one finds the lack of a / in an </key>!
(Mastering Wings to get something that looks useable is proving tricky at the moment, so I'm persevering and dabbling in the scripting side of things while I get to grips with it!)