Forum Jump :

Author Message


Posts: 74
Rank:


Country: us
Location: California
Occupation:
Age:
In-game name: TAW_Lucky

 
#1 Posted at 2009-08-21 21:22        
     
I've looked high and low for how to do this. I find references to "unitName", "NameOfUnit" and "name", but none of them work in my triggers...I'm just doing something basic for starters, like detecting if a certain unit is present in the trigger area.

What settings do I use in the trigger, and what syntax for the unit's name?

(I'm sorry if this info is out there, but I've been searching and testing for an hour w/out luck.)


Author Message


Posts: 18915
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 38
In-game name: Foxhound

 
#2 Posted at 2009-08-21 21:35        
     
Mr-murrays editing guide would make your editing life really easy........but not many people seem to believe that.
The guide covers all basic stuff like this.

Group the trigger with the unit and select the activation you want.......thats all.

Visit my family webshop desteigerhoutshop.nl.

Advertisement


Author Message


Posts: 74
Rank:


Country: us
Location: California
Occupation:
Age:
In-game name: TAW_Lucky

 
#3 Posted at 2009-08-21 21:55        
     
Foxhound : Mr-murrays editing guide would make your editing life really easy........but not many people seem to believe that.
The guide covers all basic stuff like this.

Group the trigger with the unit and select the activation you want.......thats all.

I got that early on when I got Arma 2 came out (which was my intro to the BIS games), but there are a number of places where Mr. Murray's guide (for Arma) was now outdated. But I understand that some things (a majority) are still the same.


Author Message


Posts: 1210
Rank:


Level: Member PFS

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2009-08-21 22:02        
     
another way is name your unit say "fred" without the quotes.


Set the trigger as follows.

Anybody, Present

Cond
fred in thislist
On Act
Hint "fred is here"


the trigger will only go off if fred enters the trigger.

If you had another unit say joe you could check for both

Cond
fred in thislist and joe in thislist
On Act
Hint "fred and joe are here"


Author Message

W0lle  

call me evil


Posts: 1774
Rank:


Country: de
Location:
Occupation: CWR² Developer
Age: 98
In-game name: CWR2 PR

 
#5 Posted at 2009-08-21 22:07        
     
Lucky44 : I've looked high and low for how to do this. I find references to "unitName", "NameOfUnit" and "name", but none of them work in my triggers...I'm just doing something basic for starters, like detecting if a certain unit is present in the trigger area.

What settings do I use in the trigger, and what syntax for the unit's name?

(I'm sorry if this info is out there, but I've been searching and testing for an hour w/out luck.)

Don't worry, we all started once. By the time some of us started there were no tutorials or editing guides at all.

As Fox said, the most simple way is to create a trigger where you active the stuff when the unit enters it. Then group the trigger with the unit (F2->click on trigger ->keep trigger pressed->draw line from trigger to unit and release). Now the triggers activation changes to "Vehicle present" (yes a human is also a "vehicle").
If you want to work with named units you need to edit the units properties and give it a unique name by typing that name into the Name: field. The "unitName", "nameofunit" etc. are just placeholders for your name.


Author Message


Posts: 74
Rank:


Country: us
Location: California
Occupation:
Age:
In-game name: TAW_Lucky

 
#6 Posted at 2009-08-22 15:42        
     
Thanks F2, W0lle and Fox. As usual, it turned out to be very simple (or there are two very simple ways, really!).

Where would we be without good forum help!?

I've uploaded a Tutorial Mission to help others see how to do this (attached).

You also see a video version of the tutorial on YouTube here: http://www.youtube.com/watch?v=GSfymMCgwIU.

[edit by Foxhound]
Here it is:


This mission is a brief editing tutorial on how to fire triggers via a specific person or unit. It shows two ways. The first is by using the "Grouping" method to attach a trigger to a unit. The second is by using the unit's name.

If you "play" the mission, it will walk you through how these effects work in game. If you then look at it in the editor, you can see the details of how it works.


In the first method, you attach a trigger to an individual by getting into Group mode in the editor and click-dragging a line to the unit. After you do that, you get some options. If you look at the Activation box after you connect them, you'll see that new options appear. It will no longer give you options like OpFor, BlueFor, Anybody, Radio Alpha, etc. Now it says Vehicle, Whole Group, Group Leader, or Any Member. This is fairly straightforward; it gives you a lot of variation for how the trigger gets thrown.

The second method is simpler but limited. It just checks for the individual unit's name. Note that the Activation box is set to "Anybody" for this approach.

There are lots more options/variations (like detecting when a unit enters a vehicle, when a unit is dead, etc.), but for this tutorial, I'll leave it at this.

Example mission

This post was edited by Lucky44 (2009-08-22 22:00, ago)