OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: bardosy on 28 Aug 2009, 13:01:27

Title: player/playable in triggers
Post by: bardosy on 28 Aug 2009, 13:01:27
This is the first time when I create missions with multiple playable roles... So there is a unit in the beginin what is player and a few more units is playable, so the player can switch.

My problem is, I cannot detect when the player reach a zone.

I try a trigger (with no dimensions) activated:
Code: [Select]
(player distance a_gamelogic_name) < 50But it only activated if the player are close to the gamelogic with the satrting player unit.

How can I detect the player with any playable unit? But not all playable, just what the player is acctually use.

Thanks for the answers.
Title: Re: player/playable in triggers
Post by: SaOk on 29 Aug 2009, 20:19:25
http://community.bistudio.com/wiki/isPlayer

I think it should work with isPlayer command. If you have only few named playable units then its easy to make own trigger for all of them.

To Condition: ((unitname distance a_gamelogic_name) < 50) and (isPlayer unitname)
Title: Re: player/playable in triggers
Post by: bardosy on 31 Aug 2009, 13:07:37
Sorry, the original version of solution - what I mentioned in the first post - works fine.