Thargoid wrote:Arexack_Heretic wrote:Does anyone know if it is possible to integrate a missionVariable in a runScreen missiontext parameter?
Yes it is. If you put [mission_AXTrumble] in the text of your missiontext.plist file for example, it will be substituted by the value of missionVariables.AXTrumble.
Ah great thanks!
I could not remember how, nor find in the documentation how. Might have been the lateness of the morning. It looks so obvious now.
edit. What I did yesterday (as a placeholder) was put the javascript expression in the brackets of the plist variable. That doesn't work, is like using wine for fuel, and drinking liquid quirium. It might work, but you have to refine the alcohol(mission_variable) first.

Drinking quirrium is a bad idea even if you dilute it with water first, by the way.
edit2:
That second bit of code uses a different variable than the first, but I get the idea. yes.
hehe, JS syntax is a bit weird if you're used to python. Like a thick accent. (More like Afrikaans v Dutch actually, as some basic stuff are just plain different) It's difficult to guess how some things work, like stringing strings together, as you did in the last example, I did not know how that worked in JS, but it is obvious once you're told.

Online guides and resources for JS suck btw, it generally focusses on website design, not logic, math etc.
EDIT: Not so for the OOliite wiki! I'm just too impatient, the wiki contains everything from operators to syntax to eventhandlers.
edit3: I now need to get a new keyboard...or a new Murgh to text my code.

Later. Oh, note to self: and armyboots, my current pair I've busted through the soles.
edit4: before I go: That last example with the message: foo parameter, how does that incorporate [description] references? (such as %H and [thargoid-curses] etc)