OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Gcfungus on 01 May 2008, 17:23:17

Title: Campaign weapons
Post by: Gcfungus on 01 May 2008, 17:23:17
Hey guys, got another question  :D.

I'm making a campaign, and I want to carry weapons from one mission to another. I found description.ext tutorials, but nothing worked  ???. What would the description.ext look like if I wanted to add weapons on the decision of a variable (how to use savevar).

Here's an example to make it clear:

One mission, if you pass it will set a variable (wpndecide) to 1. I then want to check if that variable is set to 1 in the next mission for the player to access certain weapons.

Can anyone help with either problem?
Thx, -=GC=-Fungus1999
Title: Re: Campaign weapons
Post by: Gcfungus on 08 May 2008, 17:14:44
Sorry to 'bump' this as it were ( :P), but I haven't got a single answer. Does anyone know? Can anyone even reccommend anything?
I'm all out of ideas  :dunno:
Title: Re: Campaign weapons
Post by: Planck on 09 May 2008, 01:29:58
Have you looked at the addWeaponPool (http://www.ofpec.com/COMREF/#15) and addMagazinePool (http://www.ofpec.com/COMREF/#10) commands?


Planck
Title: Re: Campaign weapons
Post by: Gcfungus on 11 May 2008, 09:05:37
Ok, and if I used those commands, it will allow weapons to be available in the next mission right?
Eg, if I add it in mission 3, they will be available from mission 4 onwards?
Also, if a player used mags, then swapped the gun, would the same guns be available for the next mission?

Finally, how does the savevar work, and how do I "loadvar".

Thx, -=GC=-Fungus1999  :)