OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 33OF11PE00 on 13 Dec 2012, 18:38:21

Title: Ofp trigger problem [SOLVED]
Post by: 33OF11PE00 on 13 Dec 2012, 18:38:21
I have this question: How to make trigger to react ONLY to certain unit not whole side( East present/West present/Resistance present)?
Title: Re: Ofp trigger problem
Post by: Gruntage on 13 Dec 2012, 18:47:02
Group the trigger to the selected unit.


Regards,
Gruntage
Title: Re: Ofp trigger problem
Post by: 33OF11PE00 on 13 Dec 2012, 19:02:25
Gruntage:
Can you put some code for example?
Title: Re: Ofp trigger problem
Post by: Gruntage on 13 Dec 2012, 19:08:41
There's no code. You just place your normal trigger, and a unit. Press F2 and drag a group line from the trigger to the unit.

The trigger condition will become 'vehicle present', instead of 'side present'.
Title: Re: Ofp trigger problem
Post by: 33OF11PE00 on 23 Dec 2012, 16:43:59
Gruntage:

Thanks!  :clap:. Just what I needed.

Additional question:
How to arm squad with weapons in weapon config panel?
I mean: Remove all weapons from squad and do arming by yourself.
Title: Re: Ofp trigger problem
Post by: Gruntage on 23 Dec 2012, 17:02:42
To remove all weapons from your squad, put this in the group leader's Init field:

Code: [Select]
"removeallweapons _x" foreach units group this
*syntax not guaranteed

You can then add weapons to each individual unit using 'addweapon' and 'addmagazine' commands.
Title: Re: Ofp trigger problem
Post by: 33OF11PE00 on 23 Dec 2012, 17:25:08
I mean arming like this:
1) remove all weapons from my squad

2) arm them with that briefing screen equipment panel

This is what I am meaning here.
Title: Re: Ofp trigger problem
Post by: Gruntage on 23 Dec 2012, 18:10:25
Make a description.ext and put this in it:

Code: [Select]
class Weapons
{
// Add the weapons to the mission gear
class 6G30
{
Count = 3;
};
};

class Magazines
{
// Add the magazines to the mission gear
class 6G30Magazine
{
Count = 15;
};
};

Using this example, on the briefing screen you can give a total of 3 6G30 grenade launchers, with 15 magazines. You can add more weapons and magazines, you just need the names.

You don't need to remove the weapons of your squad if you are giving them weapons in the briefing screen. You just replace what they start with.

List of OFP Weapon names: http://www.ofpec.com/COMREF/index.php?action=read&id=67
Title: Re: Ofp trigger problem
Post by: 33OF11PE00 on 23 Dec 2012, 18:13:47
Gruntage:

OH YEAH! This is just what i needed for my mission.
By the way: Merry Christmas to you all at OFPEC.

One thing more:
I changed my 3G Mokkula connection to 50M cable. Yeehaw!  :blink: :clap: