Home   Help Search Login Register  

Author Topic: Selecting Primary after spawn not working  (Read 4903 times)

0 Members and 2 Guests are viewing this topic.

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: Selecting Primary after spawn not working
« Reply #15 on: 14 Apr 2009, 01:46:44 »
Yeah, sorry, I just get bored answering the same questions over and over. Forgive me for my flipancy ::)
I didn't mean it like that...  I think SPON Kits is excellent, it made my life a whole lot easier.  I wasn't trying to imply you were being flippant!

Offline desertjedi

  • Members
  • *
Re: Selecting Primary after spawn not working
« Reply #16 on: 15 Apr 2009, 21:30:02 »
Actually, I bet this problem (respawning with pistol in hand instead of primary) appears in a ton of missions. I just noticed I get the problem in Evo (Evolution 3 MHQ Unlocked) too.

I found this code in Evo:

Code: [Select]
removeAllWeapons _player;
{player addmagazine _x} forEach pallammo;
{player addweapon _x} forEach pweapons;
player selectweapon (primaryWeapon player);

And that code will suffer from the problem too. But now, with Worldeater's code snippet, I'm pretty sure I can fix it. I modify missions to be more playable solo or with two players (plus AI) and have the players start out with a specific kit, M16A2GL (or M4GL) and M136 with 3 or 4 M136 rounds. Having the GL (M203) seems to "cause" the problem.

@Spooner, thanks for clarifying what SPON is about. I always see the items over at Armaholic but couldn't grasp what it was all about. I would probably not use your kit code in someone else's complex mission...but would probably use it in a mission I started from scratch...assuming I could understand it. I'm a total scripting noob so so many things I look at in scripts give me "WTF" moments.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Selecting Primary after spawn not working
« Reply #17 on: 16 Apr 2009, 15:59:42 »
Absolutely! SPON Kits wouldn't help an existing mission because it is a whole kit-management system and would need to be integrated into the mission to work and the amount of work that would be required would be more than the benefit gained in this case, so Worldeater's code (which is exactly what I use) would be best to just fix the existing broken code.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)