OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: LCD on 23 May 2007, 22:35:42
-
i just wanna ask some Qs to refreshen ma memory and see some changes in arma
1) is there a way to cary on variabels from mision to outro ?
2) cant think of any right now but they will come dont worry...
*gonna play wit da editor
LCD OUT
-
Welcome back LCD, long time no read.
Planck
-
Not sure if these will work out of a campaign, but you may try saveStatus with a dummy unit before your mission ends and then try to recover the value in the outro with loadStatus as long as you have there the dummy unit with same name. To transfer a numeric value, you may play with the rating or the damage of the dummy unit, after loadState in the outro, check these values of the unit.
-
we tried dat wit da orig OFP... didnt work
but i can always do dat if da player loses ill just triger a cutscene... not what i really want ut itll work
LCD OUT
-
LCD? LCD?? LCD!!! :D
Very, VERY nice to see you matey, hope all's well.
Back in OFP I sort of cracked the transfer of information from mission to outro in my Un-Impossible Mission. But it was very hard work. The only way to do variables is to code the information in someway, rating might work but dammage doesn't, it's too buggy IIRC.
Don't know if this has been fixed in ArmA.
-
HEYA MACCCA....... que pasa ? :D :cool2:
rating can move from mision 2 outro ? dat all i need tanlx and mofoin helicopters :D
gimme quick example as im afrais im gonne old and cant remember ny scripting :o
LCD OUT
-
In ArmA version 1.07.xxxx Beta (dunno about 1.06) on the contrary to what the comref says commands setVariable (http://www.ofpec.com/COMREF/ArmAOnly/index.php?action=list&game=All&letter=s#setVariable) and getVariable (http://www.ofpec.com/COMREF/ArmAOnly/index.php?action=list&game=All&letter=g#getVariable) work with all objects the AI can engage so you can store variables into soldiers and other vehicles so that might work when transferring variables from the mission into the outro (note that these commands don't work on soldiers at least in version 1.05 and below).. :dunno:
-
But where do you get a list of the variable namespace?
-
I think the variable given by this method is the very same variable that is created when you name a unit or object with the unit dialog.
For example calling your #2 'fred'.
Planck
-
Nope, because you give a value to that variable.
I believe you can't name a unit fred=100 and then guery that variable later on, with like hint format ["%1",fred]..
EDIT: Oops, slight misunderstandingasm there, I just now realised what you meant :D
So yes, you are probably right, it must work the same way..
But where do you get a list of the variable namespace?
???
dudeguy setVariable ["first_variable",1234]
...
if ((dudeguy getVariable "first_variable") >= 1234)
then {blah}
else {bleh};
-
i dont think soldiers carry on from mision to outro :dunno:
but how exactly do u tink i can do dat stuff... i want a comented example :P
LCD OUT
-
This is just a theory but if you name a soldier with the same name in the mission and in the outro it might also carry the variable you saved into the soldier to the outro.. :dunno:
I'll try to test this when I get the chance.
Probably someone else beats me to it though..
-
I bet it will not (I know it will not :P).
-
Yup, you're right..
It was far fetching anyways.. :P
-
what im gonna do is use maths :cool2:
we know dat rating moves 2 outro right ? so im gonna set rating 2 zero b4 mision ending nd add some rating 4 every obj... den have da outro depending on overall rating n stuff like dat :D
LCD OUT
-
So you hope player's rating is carried to the outro?
-
oops... i didnt read wat macca saied raight ::) :o
Back in OFP I sort of cracked the transfer of information from mission to outro in my Un-Impossible Mission. But it was very hard work. The only way to do variables is to code the information in someway, rating might work but dammage doesn't, it's too buggy IIRC.
i was thinking he said rating wud work :whistle:
but he said dat he cracked it... do u have ny hints macca ?
LCD OUT