Jump to content
Sign in to follow this  
novatekk

Question about triggers

Recommended Posts

Hey all,

I have a question about the triggers in ArmA 2. I am making this mission where you have like this shooting range (basicly a stance with a small trigger around it) from where you need to eliminate all targets inside a certain area in order to obtain a weapon (kinda like an award).

Now to actually give a certain player the weapon after he succeed in the shooting range, I use a trigger which uses the AddWeapon command. The thing is that I would like to give the player and only the player who is standing inside the trigger the weapon.

Right now I have the commands: P1 addMagazine "10Rnd_9x39_SP5_VSS"; P1 addWeapon "VSS_vintorez" in the trigger but obviously this adds the weapon to player P1 eventhough some other player might have activated the trigger. I am creating a coop mission so there might be more than one player playing the mission.

My question is: Is there a way to basicly say someting like: give weapon X only to whoever is standing inside the area of trigger Y? :confused:

Thanks in advance

Share this post


Link to post
Share on other sites

I assume that needs to go into a script? Because the game tells me that I cannot put a local variable in global space.

Share this post


Link to post
Share on other sites

I can tell you that you'll have less problem doing this in scripts rather than triggers...

Share this post


Link to post
Share on other sites

You could also just narrow down the trigger activation, to only have P1 activate it. That way only P1 will activate it. and hence only P1 will get the weapons. You might even need to create two triggers for this to work.

IE first trigger to get the list of units that is in the area then use a if statement to either give only P1 the gun or set a condition for your second trigger that would add the weapon to P1.

Share this post


Link to post
Share on other sites

Try using

this addMagazine

without the underscore placed in the On Act box, it sometimes works.

Share this post


Link to post
Share on other sites

Isn't the this variable in a trigger the boolean value of the trigger itself? If so, it is kinda useless to work on that variable.

What you could do is using thisList select 0, which will select the 1st unit which is present in the trigger, and work on that.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×