Home   Help Search Login Register  

Author Topic: Changing Handguns  (Read 1189 times)

0 Members and 1 Guest are viewing this topic.

Nobby

  • Guest
Changing Handguns
« on: 11 Oct 2002, 13:27:50 »
Howz these apples?
I want to  have a guy that can have two handguns, not 2 different handguns but the silenced version and unsilenced version of a gun.
Then in the ACTION menu I want to have the option to "ADD SILENCER" and "REMOVE SILENCER". So it's just the same gun but with a silencer and without a silencer, perfect for a mission where you have to use stealth until the alarm is raised, and then stealth dunt really matter.
Saw a Radio script once upon a time that meant a soldier could carry both a M16 and a sniper rifle but I can't find it.
Any help would be greatly appreiciated.

Cheers

Nobby

Offline Jahve

  • Former Staff
  • ****
    • Jahwerks
Re:Changing Handguns
« Reply #1 on: 11 Oct 2002, 15:33:40 »
Let's take an example with a beretta and a glock.

Allrite, here we go:
________________________

name your man 'aP' or something like it, because I am going to referr to aP later on.

twopistols1.sqs this should be activated with a radio Alpha, activation: repeatedly and have the name "Change to Glock"
and have the activation field say [] exec "twopistols1.sqs
---------------------

RemoveAllWeapons aP
aP AddWeapon "Glock"
aP AddMagazine "GlockMag"
aP AddMagazine "GlockMag"
aP AddMagazine "GlockMag"
aP AddMagazine "GlockMag"
exit

---------------------

twoweapons2.sqs this should have activation radio Bravo, repeatedly, name "Change to Beretta". on activation: [] exec "twoweapons2.sqs"
------------------------

RemoveAllWeapons aP
aP AddWeapon "Beretta"
aP AddMagazine "BerettaMag"
aP AddMagazine "BerettaMag"
aP AddMagazine "BerettaMag"
aP AddMagazine "BerettaMag"
exit

----------------------------

this concludes my scripting thingy... if this don't work, dont yell at me, since I just tried to help  :)

Nobby

  • Guest
Re:Changing Handguns
« Reply #2 on: 11 Oct 2002, 16:53:11 »
Smashing mate, just tried it and it works a treat.

Cheers

Nobby

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Changing Handguns
« Reply #3 on: 11 Oct 2002, 19:38:52 »
I've just suggested basically the same thing on the other thread ..... minor point, this script effectively gives you infinite ammo.  I think there is a command for counting magazines, not sure, but if there is you might want to add it in.    
Plenty of reviewed ArmA missions for you to play

Offline Jahve

  • Former Staff
  • ****
    • Jahwerks
Re:Changing Handguns
« Reply #4 on: 12 Oct 2002, 19:56:35 »
 ;D :D :D ;D :) :D :) :beat: :beat: :thumbsup: :toocool:

good to be of help.. havent been for a heck of a lot of time...

Indeed. But i am not the most advanced scripter... If I had the skill, I would make a script that only allowed you to change guns and dont get more ammo than you had.. so you dont get more ammo..
« Last Edit: 12 Oct 2002, 20:02:11 by Jahve »

Offline Sefe

  • OFPEC Patron
  • Former Staff
  • ****
Re:Changing Handguns
« Reply #5 on: 13 Oct 2002, 12:00:08 »
There are two solutions for the infinite ammo problem:

You can count magazines each time you change weapons. But you could still cheat by shooting until there is one bullet left and then change weapons. You would then have a fully loaded magazine.

The second (and more elegant) solution requires that you also can do addons. If you would have the silenced and the unsilenced version of the same pistiol that uses the same magazine, you would only have to switch the weapon, not the magazines. That would solve all ammo problems and would be rather easy. There will be a silenced Glock with resistance patch 1.85. I don't know if it will use the same magazines as the unsilenced one but if it does, you wouldn't have to create any addons. If it doesn't, you'll have to do exactly that.