Jump to content
Sign in to follow this  
topeira

selecting weapons? how?

Recommended Posts

Just adding to this post having done a bit of a search, I'm coming across an issue with this.

I've got a mission where I've got two sides attacking/defending an object and they can only blow it with satchels. I've given the squads loadouts and satchels, however when you die you respawn back with the squad class loadout rather than my own.

I see above that you've created a trigger to rearm anyone who respawns with the loadout of your choosing rather than the class loadout. I've tried creating this, but can't get it to work.

Exactly how do I do this please guys? I create a trigger with a 40x40 circle, repeatedly triggered, activation BLUFOR present, and then in the On Act I've pasted:

{removeAllWeapons _x;} forEach thislist; 
{_x addWeapon "NVGoggles";} forEach thislist; 
{_x addWeapon "Binocular";} forEach thislist; 
{_x addMagazine "30Rnd_9x19_MP5";} forEach thislist; 
{_x addWeapon "MP5A5";} forEach thislist; 
{_x addMagazine "30Rnd_9x19_MP5";} forEach thislist; 
{_x addMagazine "30Rnd_9x19_MP5";}forEach thislist; 
{_x addMagazine "30Rnd_9x19_MP5";}forEach thislist; 
{_x addMagazine "30Rnd_9x19_MP5";}forEach thislist; 
{_x addMagazine "30Rnd_9x19_MP5";}forEach thislist; 
{_x addMagazine "30Rnd_9x19_MP5";}forEach thislist; 
{_x addMagazine "30Rnd_9x19_MP5";}forEach thislist; 
{_x addMagazine "SmokeShell";} forEach thislist; 
{_x selectweapon "MP5A5";} forEach thislist; 

When I respawn I don't get my loadout. :(

/edit - I don't suppose the above "x" has to be a name does it? But if so how do I do it for lots of people (it's 16 per side)

Edited by Lowe

Share this post


Link to post
Share on other sites

Right - slight problem now. :)

Had 15 guys playtest my mission last night and it was good fun, but we came across an issue. When we respawn we're given the correct loadout, however the gun doesn't work. The MP5 is showing, but it doesn't work. We found that by cycling through the weapons it solved the problem, but you need to do this each time you die.

Having just read above do I need to 'select' the weapon on the end of my script?

i.e. {_x selectweapon "MP5A5";} forEach thislist;

Share this post


Link to post
Share on other sites

So I will try to take advantage of this thread too...

Didn't really find anything in the forums so far and thing it kinda fits in here too..

I got 8 playable characters in my coop map named "P1 - p8" they are /in two fireteams.

Each team has more or less the same layout..

1 soldier with a grenadelauncher (p1/p5)

1 demoman (p2/p6)

1 medic (p3/p7)

1 Light MG (vs the other team a sniper) (p4/p8)

Now I would like to be every "class" be able to pick from a different set of weapons in the beginning of the mission..

So there will still just be one LMG and one sniper.. and the medic can't choose a GL weapon but the Solder with the gerenadelauncher can...

I think you know what I mean... :)

I got the weapons to chose from ready... but everybody can choose every single weapon...

So I'm looking for a ways to give every player different weapons to choose from in the grear section befor you start the mission.

Share this post


Link to post
Share on other sites

I think that's impossible. You could only try it in the mission with dialogs but since i never worked with them i can't help you much...

Share this post


Link to post
Share on other sites

I'll also borrow this thread; I'm designing a civilian ambush that gets activated by a trigger.

Civilians are grouped to various non-presnet OPFOR so they become hostile to BLUFOR.

Now obviously on trigger activation I need to arm them so they can mow us down. I can do this easily on an individual basis (name each civi a1, a2, etc, then in trigger put: a1 exec "civigear.sqf";a2 exec "civigear.sqf" etc, where the script is just a simple addweapan/addammo deal).

BUT how do I apply this en amsse without having to name each civi, and explicitly reference each civi in the trigger? Note also that a thislist area trigger is no good, as i only want say 30 civilians in a town of 70 to be armed, not the whole lot....

Share this post


Link to post
Share on other sites

OK hello all :) so I got this mission I am working on and where the player will start without any weapon, now I hav read thrue this thread but It seem every line I try seeme to fail game say "missing ;" and then nothing more hapeneds...

this is the line ive ben trying to figure out

removeAllWeapons this;

removeAllMagazines this;

and yes I put it in the Iniziation..or whatever it is caled in the Unit info but still I get the missing messege

am I missing something or ´shold I not be able to do this with just copying the line removeAllWeapons this;

removeAllMagazines this;

to start without weapons.

Also my game is armA 2 if it has any meaning..

Thanks in advance :)

Share this post


Link to post
Share on other sites

BUT how do I apply this en amsse without having to name each civi

There is an armed civilian addon, that should do the job :)

@3inar

I'm not sure if get whatyour probem is...but try just

removeAllWeapons this;

should remove the magazines too..

Edited by kampfgeist

Share this post


Link to post
Share on other sites
There is an armed civilian addon, that should do the job :)

.

My bad for not amplifying, yes I have found that, but I'm actually doing an ambush, so the civis have 'hidden' weapons, that then appear (aka are drawn via add Weapon) upon activating a trigger. So need to use default unarmed civis, then force them to be armed upon actiavtion, which is easy, just en-masse is not so easy....

Share this post


Link to post
Share on other sites

I´ve found a M249 weapon in the armory that you can try out, but havent been able to find it in the class list.

Its a M249 Para with Eotech and forward grip, called M249 SPW in the armory.

Anybody knows how to get a hold of that one?

Share this post


Link to post
Share on other sites
I´ve found a M249 weapon in the armory that you can try out, but havent been able to find it in the class list.

Its a M249 Para with Eotech and forward grip, called M249 SPW in the armory.

Anybody knows how to get a hold of that one?

that sounds like the one from the bink us army ones.. i think i have a list of them.. one minute

VIL_M4_grip_aim

VIL_M4_grip_eot

VIL_M249_ELCAN

VIL_M240B_ELCAN

VIL_M240B

VIL_M249_PARA

VIL_M4_grip_eot_camo

pretty self explanatory names

Edited by H3NRY

Share this post


Link to post
Share on other sites

Thanks for classnames!

Have tried adding them to a weapon crate and was going to try it on my dedicated server, but this error keeps popping up:

No entry 'bin\config.bin/CfgWeapons.VIL_M249_PARA '.

Do i have to add more information anywhere else?

Share this post


Link to post
Share on other sites
Thanks for classnames!

Have tried adding them to a weapon crate and was going to try it on my dedicated server, but this error keeps popping up:

No entry 'bin\config.bin/CfgWeapons.VIL_M249_PARA '.

Do i have to add more information anywhere else?

hmm.. those are the specific ones for the weapons in the bink skin replacements/addon units.. i had them working but i had the replacements and the addon units. if you can use the para in the armory then it should work in a mission. i know there is a way to get the classname of a weapon in your hand.. dont know how to tho :)

Share this post


Link to post
Share on other sites
which is easy, just en-masse is not so easy....

Oh, I think you have to do it that way then.. but I'm not a that good with the editor(skripting)..

Maybe some of the good has an idea?!

Share this post


Link to post
Share on other sites

Hey all!

I have a small problem with this weapon choosing thing at the start of the missions. I know the code which makes the right weapons available for the players, but I couldn't find anything about how to make the briefing appear when I launch the mission. I mean I have the briefing itself on the map, but it doesn't show up automatically at start.

Thanks for the help...:)

[EDIT:] I managed to sort out the problem:

I just needed a "briefing.html" file beside the "briefing.sqf", and the briefing had to be turned on in the description... like this:

disabledAI=FALSE;
ShowGPS=1;
showCompass=1;
showWatch=1;
showMap=1;
showNotePad=1;
briefing=1;
debriefing=1;

ausome! :yay:

Edited by Sir Beaver

Share this post


Link to post
Share on other sites
There is an armed civilian addon, that should do the job :)

@3inar

I'm not sure if get whatyour probem is...but try just

removeAllWeapons this;

should remove the magazines too..

finaly worked, werry strange I wrote the exact same thing before but only after I copied your text it workt. anyways thanks man! mutch apritiated :)

Share this post


Link to post
Share on other sites

Ok hello again all! It has ben a while :P

ok so I was wondering how I can make a wepon lie on the ground without in a wepon carate or droping it on the ground, (basicaly starting with...lets say an ak lying on the ground just infront of you when you start) justlike when you drop your weapon on the ground. And also do I use the same method when/if I whant to place a weapon/object on a table or higher ground?

thanks in advance :)

/// best wishes 3inar!

Share this post


Link to post
Share on other sites

When I start adding weapons and mags to my units in the Init box, do I have to Manually add Weapons & Mags to each unit 1 by 1?? Or is there a quicker way to add the same weapon loadout to a bunch of units all at once?

Share this post


Link to post
Share on other sites

i know the command to add new weapons in the editor (i copyed and pasted bout 3 that ppl have posted) and when i press ok it says "missing ;" and there arent any missing ones? any help?

Share this post


Link to post
Share on other sites

ok so now when i put a weapon in it works, but when i go into it my hands are empty but when i shoot it makes noise (basically everything is ok except the gun im holding isnt there and the bullets dont do any damage) please help?!?!

Share this post


Link to post
Share on other sites
When I start adding weapons and mags to my units in the Init box, do I have to Manually add Weapons & Mags to each unit 1 by 1?? Or is there a quicker way to add the same weapon loadout to a bunch of units all at once?

you can do this

{this addMagazine "30rnd_556x45_STANAG"} foreach [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

this will give a soldier 10 M16 mags

ok so now when i put a weapon in it works, but when i go into it my hands are empty but when i shoot it makes noise (basically everything is ok except the gun im holding isnt there and the bullets dont do any damage) please help?!?!

i think that's just a bug, or a faulty addon, but it's never happened to me.

Edited by Militantsausage

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  

×