Home   Help Search Login Register  

Author Topic: COC Claymores  (Read 898 times)

0 Members and 1 Guest are viewing this topic.

ZIKAN

  • Guest
COC Claymores
« on: 15 Dec 2002, 13:02:01 »
I want to place a few Claymore mines in the weapon load-out screen (using a description ex. file)as an option to take before  commencing the mission. The Claymores show up and are selectable and appear in the player/units loadout.
But when in the game the Claymores are there in the 'action' menu, and when selected to place them, the unit will show the motion of bending down to place them, but nothing else happens. No Claymores are visible and no option to arm them or trigger them.
Im a bit confused about the 'firing device M57', or 'COCMinesPut'.
I put it in the description ex. in the weapon section as: COCMinesPut, is this wrong? What do i need to use in the description ex. file to get this in the weapon load out, and be able to place mines , arm them and then fire them off?
Thanks.

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:COC Claymores
« Reply #1 on: 15 Dec 2002, 22:10:39 »
Short answer:
A. Make sure you have the line [] exec "\CoC_Mines\scripts\initmines.sqs" in the init.sqs file.
B. Make sure you have at least one non-M34 CoC_mine object ont he map.  It doesn't have to be "in play"
C. If you don't want to use the claymore crate, addweaponcargo and addmagazinecargo the claymores and the M57 to a location near the start.
D. If you want to try the description.ext route (and we've encountered problems with how OFP does this), the weapon is CoCMinesPut, and the magazine is (I think -- check the docs) CoCM16Claymore.  But CoCMinesPut takes up no slots (=any unit can have it, it takes no space, and doesn't block out any other weapons), so it may not be selectable in description.ext.  You can _try_ addingweapon CoCMinesPut to the units directly, since they allow you to grab claymores, but don't do anything otherwise.

Long answer:
Here's the deal:
The Claymores are modded off the action to put satchel charges.

Satchel charges work this way:
Every unit of type "Man" has a weapon called "Put". this weapon has as magazines: satchel charges, mines, and a few other things.  So a "satchel charge" that is a "magazine" for the "put" weapon.  When you place the satchel charge, the guy bends down, the object is placed, and the simulation for satchel charges takes over (touch off, place and so on).

-
The Placeable Claymores work this way:

The "M57 Firing Device" has the weapon name "COCMinesPut".  All it is is a variant of the regular "Put" weapon enabled for claymores.  So it's a Put with magazine: CoCClaymore (or whatever it's called).
All CoCMine Objects (except the M34) have an init eventhandler that initializes an array CoCMineArray (if it's not initialized) and loads itself into it. It then launches InitMines.sqs.
Since init eventhandlers are local-only, the init.sqs call to initmines.sqs is necessary for MP to work.

One of the things initmines does is load an EventHandler that checks all units of the player group to see if they place a claymore.  If they do, the eventhandler grabs the claymore that is placed (which is nothing more than a satchel charge with claymore graphics), and replaces it with a claymore terrain object, and adds some cool actions to it.

This system works pretty well, but there are a couple drawbacks:

1. If you don't have the init line, and don't have any objects placed (the CoCCLaymoreBox also runs InitMines) at the start, none of this will work.

2. Only people in your group can place and arm claymores.  If you want the AI to do it, you need to script it.

3. For some reason, mods of the "Put" weapon don't work too well if you try to load a player with them before the mission (like you're trying to do).  If you try everything else and still get trouble, put a box with the claymores at the start and blame BIS.
« Last Edit: 15 Dec 2002, 22:16:38 by Dinger »
Dinger/Cfit

ZIKAN

  • Guest
Re:COC Claymores
« Reply #2 on: 16 Dec 2002, 14:36:21 »
Ok thanks Dinger for the help, im not so confused now lol

Like you say getting them to work from the description ex. it seems is impossible. I tried what you said, but still the player/unit wont put down the claymores.
I will proabably have add them to certain units beforehand, and not make them as an option in the load out screen.

Im curious to know why the M57 firing device does not show up as an item in the load out options. I think it would be cool if there was one made. Like the Radios made in the SEBNampack2, make a 'clacker' ,then maybe with a brilliant bit of scripting incorporated you could fire the claymores this way? Maybe in the action menu fire the claymores together, or if they were numbered do it this way: fire1, fire 3, fire 5 etc.


Part of the mission is an ambush patrol along a long stretch of road against some VC, so these claymores are needed, as its only a 6 man LRRP team against a lot of gooks.

Thanks.

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:COC Claymores
« Reply #3 on: 16 Dec 2002, 18:32:43 »
The reason why it doesn't show up is because it is a "no slot" weapon.
so it's weapon: CoCMinesPut
Magazine: CoCM18A1
But I repeat, for some reason, OFP doesn't like to make mods of the put weapon work well with preloaded stuff.  So you may find that it just won't work, no matter what you do.
THe solution is to place a CoCClaymoreCrate, remove everything from it, and put in an appropriate number of m57s/claymores.
(Why a CoCClaymoreCrate?  Because it initializes the CoCMineArray.  If you don't have any CoCMine objects on the map, placeable claymores will work, after about a minute).
I agree that a fancy firing device that took a pistol slot and made a clacking noise would be cool, and maybe in the future we'll try it, but the amount of work involved (another fire eventhandler, a clacking noise, some way to link this object both to the put and the detonate actions, making claymores take a weapon slot)  seemed disproportionate to the reward.  You are of course, free to play with them.
If you need to bank your claymores, you can createvehicle some "M34 Blasting MAchines" in the direction you need.  Those will work on placed claymores.
If you're looking for a fancier solution, once the claymores are placed, they're in an array "CoCPlacedClaymores" which is local to the placing client.
If you're looking for a compromise, the script /CoCMines/scripts/MineDetonate.sqs (I think that's what it's called, check the docs) has a variety of funky modes.  you could add a "remote control" mode that passes:
[player, 100, 30 "CoCM18A1Claymore"] exec "MineDetonate.sqs"
iwth an addaction or something, it will detonate the nearest claymore that the player is looking at.

Anyway, check the "scripter's manual" for some of these details.
Good luck on your map.  I hope you can find a solution that works and doesn't look too crappy.
Dinger/Cfit

ZIKAN

  • Guest
Re:COC Claymores
« Reply #4 on: 17 Dec 2002, 01:26:27 »
Yes i may have  to compromise by assigning claymores to a unit before hand, the story is the LRRP team have been on patrol for a week, so it wouldnt be realistic just to leave an ammo box in the jungle for them to get their claymores. I thought about trying to do a helo resupply, which might be more interesting, i'll see what i can do to get it to work.

I think the COC Mines are excellent by the way, it certainly takes OFP another step forward.


Cheers for your help m8  :thumbsup:

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:COC Claymores
« Reply #5 on: 17 Dec 2002, 17:09:26 »
another solution is to add a "BackPack" script of some sort, that when selected, createvehicles an empty container, and fills it with CoCMinesPUt and the claymores.
Dinger/Cfit