Welcome, Guest Friday 18th April 2014, 20:03:21
   Home   Help Search Login Register  

OFPEC Forum

Author Topic: Show / Display the map & Closing map  (Read 373 times)
0 Members and 1 Guest are viewing this topic.
GameAdd1cted
*
Offline Offline


« on: 15 Jan 2010, 21:54:10 »

Hi,

I made a script that allows the user to place units on the map (onMapSingleClick).
I would like to bring up the map to the player automatically (no need to press the "M" key).

I tried:
- showmap: doesn't display the map at all.
- forcemap: it overlays the map, but no good as it does not allow clicking on the map (you're clicking in 3d).

I found a similar thread without answer.
I post the link just in case I didn't explain myself properly (http://forums.bistudio.com/showthread.php?t=54599)

Thank you.
« Last Edit: 16 Jan 2010, 17:59:02 by GameAdd1cted » Logged
DeanosBeano
Addons Depot Staff
*****
Offline Offline


SirDeanosbeano bstowed on me by sui ;)


WWW
« Reply #1 on: 15 Jan 2010, 22:22:38 »


  the wiki apparently says its changed for Arma2
 SHOWMAP true
Quote
In ArmA 2 - This command no longer works. The map is now an inventory item. It is kept under the weapon class name "itemmap". Example: unitname removeweapon "itemmap". To add again use unitname addweapon "itemmap". [/quote

 How this helps i dunno maybe selectweapon "ItemMap" or something will now activate it ?
 
 hope this helps some way
Logged

I love ofp
GameAdd1cted
*
Offline Offline


« Reply #2 on: 15 Jan 2010, 23:36:43 »

Guys,

I just got the solution in another forum:

Code:
openMap true;

 Clapping
Logged
kju
*
Offline Offline



WWW
« Reply #3 on: 15 Jan 2010, 23:37:46 »

that works for me:

Code:
onMapSingleClick "vehicle player setPos _pos; onMapSingleClick ''; true;"; openMap true;
Logged

GameAdd1cted
*
Offline Offline


« Reply #4 on: 16 Jan 2010, 15:43:52 »

kju,

Is there the opposite command (e.g. closemap true)?
I would like to automatically close the map after the user clicks on it.
Logged
kju
*
Offline Offline



WWW
« Reply #5 on: 16 Jan 2010, 16:01:03 »

Code:
closeDialog 316000;
Logged

GameAdd1cted
*
Offline Offline


« Reply #6 on: 16 Jan 2010, 17:58:38 »

Kju,

Thanks for the early reply. I tried inserting the provided code, but it is not working.
I attach the code:

Code:
openMap true;
onMapSingleClick "UnitToSpawn createUnit [_pos, enemyGroup]; onMapSingleClick '';true;";
closeDialog 316000;

After I click on the map, it still remains open.
Is 316000 the idd of the map? I looked at http://community.bistudio.com/wiki/closeDialog but explanations are scarce.
Logged
kju
*
Offline Offline



WWW
« Reply #7 on: 16 Jan 2010, 20:23:14 »

sorry i was confused. try 51 for RscMapControl (IDC)
Logged

GameAdd1cted
*
Offline Offline


« Reply #8 on: 16 Jan 2010, 20:28:30 »

I tried
Code:
closeDialog 51
Still not working  Sad
Logged
Pages: [1]   Go Up
  Send this topicPrint  
 
Jump to: