OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started 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.
-
the wiki apparently says its changed for Arma2
SHOWMAP true
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
-
Guys,
I just got the solution in another forum:
openMap true;
:clap:
-
that works for me:
onMapSingleClick "vehicle player setPos _pos; onMapSingleClick ''; true;"; openMap true;
-
kju,
Is there the opposite command (e.g. closemap true)?
I would like to automatically close the map after the user clicks on it.
-
closeDialog 316000;
-
Kju,
Thanks for the early reply. I tried inserting the provided code, but it is not working.
I attach the 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.
-
sorry i was confused. try 51 for RscMapControl (IDC)
-
I tried
closeDialog 51
Still not working :(