Home   Help Search Login Register  

Author Topic: Show / Display the map & Closing map  (Read 3062 times)

0 Members and 1 Guest are viewing this topic.

Offline GameAdd1cted

  • Members
  • *
Show / Display the map & Closing map
« 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 »

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Show / Display the map
« 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
I love ofp

Offline GameAdd1cted

  • Members
  • *
Re: Show / Display the map
« Reply #2 on: 15 Jan 2010, 23:36:43 »
Guys,

I just got the solution in another forum:

Code: [Select]
openMap true;
 :clap:

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Show / Display the map - SOLVED
« Reply #3 on: 15 Jan 2010, 23:37:46 »
that works for me:

Code: [Select]
onMapSingleClick "vehicle player setPos _pos; onMapSingleClick ''; true;"; openMap true;

Offline GameAdd1cted

  • Members
  • *
Re: Show / Display the map - SOLVED
« 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.

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Show / Display the map [SOLVED]
« Reply #5 on: 16 Jan 2010, 16:01:03 »
Code: [Select]
closeDialog 316000;

Offline GameAdd1cted

  • Members
  • *
Re: Show / Display the map [SOLVED]
« 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: [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.

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Show / Display the map & Closing map
« Reply #7 on: 16 Jan 2010, 20:23:14 »
sorry i was confused. try 51 for RscMapControl (IDC)

Offline GameAdd1cted

  • Members
  • *
Re: Show / Display the map & Closing map
« Reply #8 on: 16 Jan 2010, 20:28:30 »
I tried
Code: [Select]
closeDialog 51Still not working  :(