OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Supergrunt on 26 Jul 2010, 03:22:35

Title: detect when taking a look at map
Post by: Supergrunt on 26 Jul 2010, 03:22:35
hi there,

i am building a mission where the player has survived a crash landing but lost his gear in the process

now i want a hint to come up when i look at the map but the hint needs to come up only if the player has the itemMap  

i tried the following code in a trigger set to ONCE  but it seems something is wrong  

jc hasweapon "itemMap" && if (visibleMap) then {hint "Damn these are Takistani assault plans and it looks like its going to happen soon, i better get to a radio !"}

i also noticed that the hint keeps comming while i want it to only show once (its my task update)

can anybody help me ?
Title: Re: detect when taking a look at map
Post by: Wolfrug on 26 Jul 2010, 11:12:31
You don't need the second "if" there, since visibleMap (http://www.ofpec.com/COMREF/index.php?action=details&id=1199&game=All) is already boolean in nature. So:

Condition:
jc hasweapon "itemMap" && (visibleMap)

On Activation: hint "Damn these are Takistani assault plans and it looks like its going to happen soon, i better get to a radio !"

As long as the trigger is set to "once", it'll just update that one time :)

Wolfrug out.
Title: Re: detect when taking a look at map
Post by: Supergrunt on 26 Jul 2010, 22:17:54
tnx wolfie   your the best (and i mean it, because The MK1 RUG_Body armor by wolfrug inc. keep me alive :P) it realy works now :)