Home   Help Search Login Register  

Author Topic: About "SaveVar" and "Condition Presence"  (Read 804 times)

0 Members and 1 Guest are viewing this topic.

matjoa

  • Guest
About "SaveVar" and "Condition Presence"
« on: 11 Mar 2003, 18:29:51 »
Does it really work?

I made a little campaign with two missions with 2 enemy soldiers ("s1", "s2") and the player. The 1st ends when "s1" is killed. The 2nd and the campaign end when all soldiers are killed.

At the end of the 1st mission, I execute the exit.sqs:

? (alive s1) : s1live = true
? (alive s2) : s2live = true

SaveVar "s1live"
SaveVar "s2live"

Then in 2nd mission in the "Condition presence" I put each soldier unit: "s1live". "s2live".

OK, that works: when I kill "s1" and finish the 1st mission, the 2nd mission starts only with the soldier "s2", but I have two problems:

1. If I am killed in the 2nd, and click the "Retry" option, the soldiers don't appear in the game. This is because the "condicion presence" => "s2live" is not true, and I think this is cause the program clears the variables when I press the "Retry" option. How can I fix that?

2. When I am "previewing" in the editor, the 2nd misison, either
appear any soldier in screen.

In both cases, I "debugged" the variables, and the result was something as: "string bool array 0xffffffef" -> that is not recognized neither "true" nor "false".

Thank you in advance
JF.

« Last Edit: 13 Mar 2003, 13:15:05 by matjoa »

Offline Black_Feather

  • Former Staff
  • ****
  • I'll never forget you Daisey.
Re:About "SaveVar" and "Condition Presence"
« Reply #1 on: 12 Mar 2003, 00:12:03 »
 ??? oh  :( it used to work ok, what version you running? You are using SaveVar right

SaveVar "s1live"

sorry but I've got to ask

matjoa

  • Guest
Re:About "SaveVar" and "Condition Presence"
« Reply #2 on: 12 Mar 2003, 00:25:55 »
Hi and thanks,

I am using the 1.46

It seems that the "Retry" action, to 'nil' the variables defined by the user. I debugged the value in the init.sqs, and I can see that:

- When the mission starts from the previous -> "false" or "true" (depending on)
- When the mission starts from the "Retry" -> "string bool array ...."

I don't know what to do...  :-\
« Last Edit: 12 Mar 2003, 10:59:37 by matjoa »