OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: GameAdd1cted on 15 Jan 2010, 21:54:10

Title: Show / Display the map & Closing map
Post by: GameAdd1cted 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.
Title: Re: Show / Display the map
Post by: DeanosBeano 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
Title: Re: Show / Display the map
Post by: GameAdd1cted on 15 Jan 2010, 23:36:43
Guys,

I just got the solution in another forum:

Code: [Select]
openMap true;
 :clap:
Title: Re: Show / Display the map - SOLVED
Post by: kju on 15 Jan 2010, 23:37:46
that works for me:

Code: [Select]
onMapSingleClick "vehicle player setPos _pos; onMapSingleClick ''; true;"; openMap true;
Title: Re: Show / Display the map - SOLVED
Post by: GameAdd1cted 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.
Title: Re: Show / Display the map [SOLVED]
Post by: kju on 16 Jan 2010, 16:01:03
Code: [Select]
closeDialog 316000;
Title: Re: Show / Display the map [SOLVED]
Post by: GameAdd1cted 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: [Select]
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.
Title: Re: Show / Display the map & Closing map
Post by: kju on 16 Jan 2010, 20:23:14
sorry i was confused. try 51 for RscMapControl (IDC)
Title: Re: Show / Display the map & Closing map
Post by: GameAdd1cted on 16 Jan 2010, 20:28:30
I tried
Code: [Select]
closeDialog 51Still not working  :(