How to create a marker on desired map position using OnMapSingleClick?, Won't work! |
How to create a marker on desired map position using OnMapSingleClick?, Won't work! |
May 22 2010, 22:55
Post
#1
|
|
Member Group: Members Posts: 131 Joined: 22-May 10 Member No.: 7,651 |
Hi all!
I'm quite familiarized with the command: OnMapSingleClick But, i can't make a marker appear in the clicked position... i can make it appear in a defined position... but not in the clicked position! I did this with ArmA 1 and it worked perfectly, but now, i cannot make it work for ArmA 2!! Help plz! Best Regards, SGJackson! |
|
|
May 23 2010, 00:12
Post
#2
|
|
ArmAdeus Group: Administrators Posts: 147 Joined: 30-January 07 From: München Member No.: 559 |
Try this
QUELLTEXT "NameMarker" setMarkerPos [0,0];
onMapSingleClick "Anything move _pos;""NameMarker"" setMarkerPos _pos"; true;" onMapSingleClick ''; -------------------- |
|
|
May 23 2010, 00:47
Post
#3
|
|
Member Group: Members Posts: 131 Joined: 22-May 10 Member No.: 7,651 |
Mhm...
Define 'anything' and why is it moving to _pos? You tried this? 'cause as far as i remember you can't use more quotation inside the OnMapSingleClick quotations... and, this happens in a script or locally? Also, i tried using _pos too... it didn't work for me I really appreciate your answer.. just need to straight those things up Best Regards, SGJackson! |
|
|
May 23 2010, 00:57
Post
#4
|
|
ArmAdeus Group: Administrators Posts: 147 Joined: 30-January 07 From: München Member No.: 559 |
I used it for an repair truck as support in one of my missions. It works ^^
repm is the name of the marker. repi is the name of the repair truck. And _pos defines the position you've clicked on the map. My part of the script i used: QUELLTEXT "repm" setMarkerPos [0,0];
titleText ["Click on the map to define the position of the repair truck.","plain down"]; onMapSingleClick "repi move _pos;""repm"" setMarkerPos _pos"; true;" onMapSingleClick ''; -------------------- |
|
|
May 23 2010, 01:12
Post
#5
|
|
Member Group: Members Posts: 131 Joined: 22-May 10 Member No.: 7,651 |
Sorry but.. it didn't work..
as i said, the _pos isn't defined... it doesn't work |
|
|
Lo-Fi Version | Time is now: 26th April 2024 - 14:55 |