Home   Help Search Login Register  

Author Topic: Safe mode for weapons  (Read 562 times)

0 Members and 1 Guest are viewing this topic.

grey

  • Guest
Safe mode for weapons
« on: 02 Jul 2004, 14:31:44 »
it would be nice to have a safe mode action for the guns.

the guns would be put to safe mode at the start, the player would have to set it to semi to shoot.

i can't really script and would hope that someone could help me out with this.
 ;D

ponq

  • Guest
Re:Safe mode for weapons
« Reply #1 on: 02 Jul 2004, 15:03:56 »
you could prolly start with an empty gun by removing all ammo.

Then just add the ammo again. The player (and AI) now first has to reload before he can shoot.

grey

  • Guest
Re:Safe mode for weapons
« Reply #2 on: 04 Jul 2004, 03:46:07 »
but the problem is i would like to have it be able to set bet to safe later on...

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Safe mode for weapons
« Reply #3 on: 04 Jul 2004, 11:16:25 »
This is not a mission editing question.   What you want to do is alter the game itself, and in general that is not possible with mission editing tools like scripting.    When it is possible it usually requires heavy duty scripting.

If somebody comes up with a solution that's great, but I wouldn't hold your breath.
Plenty of reviewed ArmA missions for you to play

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Safe mode for weapons
« Reply #4 on: 04 Jul 2004, 13:55:55 »
How about an Addaction script, say - this addAction ["Safety On", "safety.sqs"]

All the script would have to do is record the players current weapons and magazines, delete them, then add them back again weapon first so that they are unloaded.

Since it is an addaction you could do it as many times as you liked.  You could even add a little sidechat or title cut like - "Weapon locked !".  If you really wanted to go overboard, you could add a custom sound of the safety going on.

Not too hard I think but so far my one script attempt at removing and restoring a players weapon hasn't worked.

Future query topic that !



Rags

Homefry31464

  • Guest
Re:Safe mode for weapons
« Reply #5 on: 06 Jul 2004, 03:05:06 »
You can't delete a half empty magazine and add it back again...adding a new magazine will give them a full mag, so the player could have unlimited ammo.

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Safe mode for weapons
« Reply #6 on: 06 Jul 2004, 03:57:23 »
Okay, you got me.

Could you do it via an event handler ?  As in - if you put the safety on (via the Addaction script) then an eventhandler becomes active that stops you firing ?  I've never used event handlers so I have absolutely no idea what I'm talking about   :(   but I'm thinking along the lines of the "fired" event handler.

Probably not, but this is an interesting thread !


grey

  • Guest
Re:Safe mode for weapons
« Reply #7 on: 06 Jul 2004, 14:27:12 »
btw since roni has brought up the 'fired' eventhandlers...

can u do 2 different types of 'firing' eventhandlers?

example: i wana trigger a script for the mg n a diff script for the main round for a tank by using the 'fired' eventhandlers.  ???

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Safe mode for weapons
« Reply #8 on: 06 Jul 2004, 14:41:22 »
Err, I think so.    The fired eventhandler returns a number of parameters, one of which (I think) is the muzzle.    The first the script would do is figure out which muzzle fired and then take the appropriate action.

There's a good piece on eventhandlers somewhere, it might be in the FAQ but I'm not sure.

You can use the hint format trick to run tests to see what is what.
Plenty of reviewed ArmA missions for you to play

Homefry31464

  • Guest
Re:Safe mode for weapons
« Reply #9 on: 06 Jul 2004, 22:04:13 »
Igor Drukov (or something similar), wrote a tute on Eventhandlers, its in the Ed. Depot.

EDIT: Search Results-Look for the author name.
« Last Edit: 06 Jul 2004, 22:05:37 by Homefry »