Home   Help Search Login Register  

Author Topic: SaveVar...  (Read 1494 times)

0 Members and 1 Guest are viewing this topic.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
SaveVar...
« on: 07 Nov 2004, 13:20:16 »
Can SaveVar save arrays? If not, I'm going to kill myself.

Thanks!

:beat: *Gets Shot* :beat:

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:SaveVar...
« Reply #1 on: 07 Nov 2004, 15:27:06 »
AFAIK saveVar is for saving variables in a campaign.

Then the variable is also available to other missions in the campaign if needed.

Not sure if it also saves arrays though....but I doubt it


What are you going to kill yourself with.........the toothbrush?


Planck
« Last Edit: 07 Nov 2004, 15:27:59 by Planck »
I know a little about a lot, and a lot about a little.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:SaveVar...
« Reply #2 on: 07 Nov 2004, 15:28:00 »
Well, it should...
Otherwise it would be quite useless function...

But, you better get the gun... ;D
It's OFP so you never know... ::)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:SaveVar...
« Reply #3 on: 07 Nov 2004, 15:59:22 »
Well, I used scripted a system the last 3 weeks and it's based on arrays. Would be a shame if savevar wouldn't work on it.

Ordering that toothbrush now. ;D

:beat: *Gets Shot* :beat:

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:SaveVar...
« Reply #4 on: 10 Nov 2004, 16:17:13 »
Are the saveVar created variables exactly same kind of variables as the locals and globals, exept that it can be carried through campaign?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:SaveVar...
« Reply #5 on: 10 Nov 2004, 16:29:48 »
saveVar does not create variables.   It merely stores them somewhere so that the next mission in the campaign can pick them up.    It would be advisable, if not essential, for them to be global.
Plenty of reviewed ArmA missions for you to play

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:SaveVar...
« Reply #6 on: 10 Nov 2004, 17:06:32 »
So, what can vars do then? Are they variables only the next mission can pick up?

I mean, if I script something like this

SaveVar "Variable"
Variable= getPos soldier

Can I call that array in the next mission by typing
Titletext [format["Test %1", variable],"Plain Down"]?

Thanks
« Last Edit: 10 Nov 2004, 17:10:55 by Epeli »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:SaveVar...
« Reply #7 on: 10 Nov 2004, 18:17:12 »
Well you'd have to have the lines the other way round (else you're operating on a variable that doesn't exist) and I'm not sure about syntax etc., but yes, that's the general idea.     I think you need a loadVar command or something to call the value.
Plenty of reviewed ArmA missions for you to play

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:SaveVar...
« Reply #8 on: 10 Nov 2004, 18:26:39 »
Thanks :) Though there wasn't load var command in the command reference... I quess I have to investigate my self... :P

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:SaveVar...
« Reply #9 on: 10 Nov 2004, 18:38:20 »
You don't need to load it.

:beat: *Gets Shot* :beat:

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:SaveVar...
« Reply #10 on: 10 Nov 2004, 18:48:52 »
I might be thinking of loadStatus.   If it exists.
Plenty of reviewed ArmA missions for you to play

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:SaveVar...
« Reply #11 on: 15 Nov 2004, 16:05:16 »
Does save war work in init.sqs? (Thank you for all the help :) )

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:SaveVar...
« Reply #12 on: 15 Nov 2004, 16:26:24 »
Should work.

:beat: *Gets Shot* :beat: