OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: LCD on 23 May 2007, 22:35:42

Title: cant find a name 4 a thread with simple Qs
Post 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
Title: Re: cant find a name 4 a thread with simple Qs
Post by: Planck on 23 May 2007, 22:42:13
Welcome back LCD, long time no read.


Planck
Title: Re: cant find a name 4 a thread with simple Qs
Post by: Mandoble on 23 May 2007, 22:52:23
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.
Title: Re: cant find a name 4 a thread with simple Qs
Post by: LCD on 23 May 2007, 23:19:44
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
Title: Re: cant find a name 4 a thread with simple Qs
Post by: macguba on 24 May 2007, 02:46:05
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.
Title: Re: cant find a name 4 a thread with simple Qs
Post by: LCD on 24 May 2007, 06:30:27
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
Title: Re: cant find a name 4 a thread with simple Qs
Post by: h- on 24 May 2007, 14:56:34
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:
Title: Re: cant find a name 4 a thread with simple Qs
Post by: Mr.Peanut on 24 May 2007, 21:50:40
But where do you get a list of the variable namespace?
Title: Re: cant find a name 4 a thread with simple Qs
Post by: Planck on 24 May 2007, 22:12:07
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
Title: Re: cant find a name 4 a thread with simple Qs
Post by: h- on 24 May 2007, 22:48:27
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..

Quote
But where do you get a list of the variable namespace?
???

Code: [Select]
dudeguy setVariable ["first_variable",1234]

...

if ((dudeguy getVariable "first_variable") >= 1234)
 then {blah}
   else {bleh};
Title: Re: cant find a name 4 a thread with simple Qs
Post by: LCD on 24 May 2007, 23:54:30
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
Title: Re: cant find a name 4 a thread with simple Qs
Post by: h- on 25 May 2007, 14:48:52
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..
Title: Re: cant find a name 4 a thread with simple Qs
Post by: Mandoble on 25 May 2007, 15:13:44
I bet it will not  (I know it will not  :P).
Title: Re: cant find a name 4 a thread with simple Qs
Post by: h- on 25 May 2007, 17:52:48
Yup, you're right..
It was far fetching anyways..  :P
Title: Re: cant find a name 4 a thread with simple Qs
Post by: LCD on 25 May 2007, 18:02:53
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
Title: Re: cant find a name 4 a thread with simple Qs
Post by: Mandoble on 25 May 2007, 18:27:08
So you hope player's rating is carried to the outro?
Title: Re: cant find a name 4 a thread with simple Qs
Post by: LCD on 25 May 2007, 18:30:38
oops... i didnt read wat macca saied raight  ::)  :o

Quote
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