Jump to content
Sign in to follow this  
limmy3

Remove equipment from briefing

Recommended Posts

Hello there,

I have another question:  icon_rolleyes.gif

How can I remove the equipment from the players unit in the briefing?    huh.gif

I made a RemoveEquipment.sqs file to remove everything from all units + player except the weapon and the magazines.

This works fine in the mission editors preview none of the units have their grenades or NVGoggles or ect.    biggrin_o.gif

But saving the game as *.sqs and starting it as single mission the equipment for the player is available.

The black ops as player should not be able to use pipebomps nor the nvgoggle.   sad_o.gif  

How can I change this?

Regards limmy3

Share this post


Link to post
Share on other sites

Name the soldiers you want to remove the weapons from;

Make an init.sqs file with in it

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

nplayers = [w1,w2,w3,w4,w5,w6,w7,w8,.....]

{RemoveAllWeapons _x} forEach nplayers

Share this post


Link to post
Share on other sites
I made a RemoveEquipment.sqs file to remove everything from all units + player except the weapon and the magazines.

This works fine in the mission editors preview none of the units have their grenades or NVGoggles or ect. biggrin_o.gif

But saving the game as *.sqs and starting it as single mission the equipment for the player is available.

Saving the game as *.sqs ? It's a *.pbo, isn't it? smile_o.gif

Probably you don't know that exporting a mission from the OFP Editor is very nasty:

It works only once per OFP session, afterwards the created .pbo remains write protected until the OFP session is closed. - And the editor does never tell you that you're no longer able to export any new changes.

Also saving a mission under a new filename won't copy the scriptfiles into the new folder. You've got to do that manualy.

Share this post


Link to post
Share on other sites

You can however alt+tab and delete the old pbo to write a new one without restarting ofp. Or use external packer. And why pack it before it's ready wink_o.gif

... you do have to load a different mission though before deleting.

Share this post


Link to post
Share on other sites
I made a RemoveEquipment.sqs file to remove everything from all units + player except the weapon and the magazines.

This works fine in the mission editors preview none of the units have their grenades or NVGoggles or ect. biggrin_o.gif

But saving the game as *.sqs and starting it as single mission the equipment for the player is available.

Saving the game as *.sqs ? It's a *.pbo, isn't it? smile_o.gif

Probably you don't know that exporting a mission from the OFP Editor is very nasty:

It works only once per OFP session, afterwards the created .pbo remains write protected until the OFP session is closed. - And the editor does never tell you that you're no longer able to export any new changes.

Also saving a mission under a new filename won't copy the scriptfiles into the new folder. You've got to do that manualy.

use a filemanager and PBO ur missions manually;

look here perhaps http://www.flashpoint1985.com/cgi-bin....t=52949

banghead.gifbanghead.gifbanghead.gif

auch!

ehm banghead.gif

init.sqs loads before the briefing... and offcourse you would have to pbo again... not that nasty tounge2.gif

enjoy whistle.gif

Share this post


Link to post
Share on other sites
Probably you don't know that exporting a mission from the OFP Editor is very nasty:

It works only once per OFP session, afterwards the created .pbo remains write protected until the OFP session is closed. - And the editor does never tell you that you're no longer able to export any new changes.

I'm sure a total write protection was present in the past for me but you're right Metal Heart, alt+tab did work when I tried it now in 1.96.

Share this post


Link to post
Share on other sites
Quote[/b] ]But saving the game as *.sqs and starting it as single mission the equipment for the player is available.

The black ops as player should not be able to use pipebomps nor the nvgoggle.  

Yes you're right of course I meant *.pbo.

I have learned a lot of the material mission editor although this was new to me.

Quote[/b] ]I'm sure a total write protection was present in the past for me but you're right Metal Heart, alt+tab did work when I tried it now in 1.96.
Quote[/b] ]And why pack it before it's ready

Well,  because you can see whether all setting are correct when you run it as the final game.

In  the mission editor you can't see and change the weapons and magazines nor the equipment in the briefing.

And this was my question:

Which command do I have to use to prevent it that the player a black op can use the pipebombs and the nvgoggle? It should not be listed.  huh.gif

In the description.ext you can add weapons, mags and equipment to choose in the briefing.

Quote[/b] ]I made a RemoveEquipment.sqs file to remove everything from all units + player except the weapon and the magazines.

 This will not delete weapons, mags and equipment from the main briefing, it works in the mission editor allright.
Quote[/b] ]Make an init.sqs file with in it<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

Code Sample  

nplayers = [w1,w2,w3,w4,w5,w6,w7,w8,.....]

{RemoveAllWeapons _x} forEach nplayers

This does not work! confused_o.gif

Regards limmy3   goodnight.gif

Share this post


Link to post
Share on other sites

This time you have to edit the description.ext. You should find pipebombs and nvg listed in it as they are currently available. Remove them there.

To check the briefing in editor hold shift while clicking preview.

Share this post


Link to post
Share on other sites

Hello Trapper,

This is how my description.ext looks like:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//Configuration of the Description.ext file

//Display the debriefing notepad

debriefing= 1

//Display the Map

showMap= 0

//Display the GPS

showGPS= 0

//Display the compass

showCompass= 0

//Display the watch

showWatch= 0

//Display the notepad

showNotepad= 1

//Display the introtitle when uploading

onLoadIntro= "The maze"

//Display the title when uploading

onLoadMission= "The Entrance"

//Display the outro title when uploading

onLoadOutro= " ... the end "

//The seting of guns, fons and background used.

//Choose WEAPON from list

class Weapons

{

class M21 { count = 1;};

class M16 { count = 1;};

class HK { count = 1;};

class M4 { count = 1;};

class M60 { count = 1;};

class Glock { count = 1;};

};

//Choose Magazine from list

class Magazines

{

class M21 { count = 10;};

class M16 { count = 10;};

class HK { count = 10;};

class M4 { count = 10;};

class M60 { count = 10;};

class Glockmag { count = 10;};

};

Quote[/b] ]This time you have to edit the description.ext. You should find pipebombs and nvg listed in it as they are currently available. Remove them there.
There are none listed the pipebombs and nvgoggle comes from the unit itself. But perhaps I found another way I have the check it out first.
Quote[/b] ]To check the briefing in editor hold shift while clicking preview.
Thank you I didn't know this before.

Thank you for your great help.

I'll let you know if the other way works.

Regards limmy3  smile_o.gif

Share this post


Link to post
Share on other sites

Now I've got the point.(?) smile_o.gif

You want the blackops to start without pipebombs and NVG. The items were never listed in the gear storage but you weren't able to remove them from the units right at mission start.

It just confused me that you mentioned the briefing screen.

Sven's script lines right in the init.sqs are one way. The syntax is correct. Make sure your blackops are named w1, w2 and so on and don't end the array with ,......] like the example does.

A file named init.sqs in the mission folder is the first thing beeing executed and has effect on the briefing.

The init lines of units are executed afterwards and in a specific order but still before the briefing.

Share this post


Link to post
Share on other sites

Hello Trapper,

Well, sorry I wasn't direct enough. whistle.gif

I have no experience with scripting and I have to learn it.

It didn't come out clear enough that it is only one black op unit.  confused_o.gif

It's just raining cats 'n' dogs.  crazy_o.gif

The line should be this then:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; This removes all equipment from the units items.

nplayers = [Player]

{RemoveAllWeapons _x} forEach nplayersThe units name is Player.

Unfortunally I can't test it because I've got to go work in a few minutes.

Thank you!

Regards limmy3

Share this post


Link to post
Share on other sites

Hellooo agaaiinn,   wink_o.gif

Well, this doesn't work for a single unit:

Quote[/b] ]; This removes all equipment from the units items.

Player = [Player]

{RemoveAllWeapons _x} forEach nplayers

I tried it but I still had the items. And gave an Error!

This is the simpliest way:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "RemoveEquipment.sqs";

RemoveAllWeapons this;

Player AddMagazine "HK";

Player AddWeapon "HK";

Player AddMagazine "HK";

Player AddMagazine "HK";

Player AddMagazine "HK";

Player AddMagazine "HK";

Player AddMagazine "HK"Write this in the players Init and everything works fine.

Well, sometimes you find out that the easiest way is that you don't see at the first place. confused_o.gif

Regards limmy3

Share this post


Link to post
Share on other sites

player removemagazines "pipebomb"; player removeweapon "NVGoggles"

Is this what you want to do?

Share this post


Link to post
Share on other sites

Hello DanAK47,

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player removemagazines "pipebomb"; player removeweapon "NVGoggles"

I do know these commands.

My thoughts were for a easy command just to remove the equipment.

But now I wrote the commands right in  the initiation field of the unit.

Thanks!

Regards limmy3  biggrin_o.gif

Share this post


Link to post
Share on other sites
Well, this doesn't work for a single unit:
Quote[/b] ]; This removes all equipment from the units items.

Player = [Player]

{RemoveAllWeapons _x} forEach nplayers

I tried it but I still had the items. And gave an Error!

Well, slow down limmy, let me explain... smile_o.gif

Foreach is really too much work for a single unit but it does work. First of all a script has to be correct and you still had the items because of that error. These error messages are usefull most of the time.

The problem is the line Player = [Player]:

1. look above, you were told to write nPlayers = [Player].

2. You're trying to store an array as a global variable named Player. That's impossible because Player is an OFP scripting command. (You're already using it in the following "word" to add the player unit to the array.)

3. As no array nPlayers exists, foreach can't do anything.

Share this post


Link to post
Share on other sites

So to conclude,

make a file called init.sqs which you include in your mission folder.

Name your soldier for example w1

in the init.sqs put:

w1 removemagazines "pipebomb"

w1 removeweapon "NVGoggles"

You'll have the weaponry from the description.ext working fine, but there shouldn't be any satchels or nightvision availlable for soldier w1

Greetz wink_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×