Home   Help Search Login Register  

Author Topic: detect when taking a look at map  (Read 2309 times)

0 Members and 1 Guest are viewing this topic.

Offline Supergrunt

  • Members
  • *
detect when taking a look at map
« 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 ?
« Last Edit: 26 Jul 2010, 03:29:12 by Supergrunt »

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: detect when taking a look at map
« Reply #1 on: 26 Jul 2010, 11:12:31 »
You don't need the second "if" there, since visibleMap 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.
"When 900 years YOU reach, look as good you will not!"

Offline Supergrunt

  • Members
  • *
Re: detect when taking a look at map
« Reply #2 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 :)
« Last Edit: 28 Jul 2010, 10:36:46 by Supergrunt »