IPB


Welcome Guest ( Log In | Register )

 Forum Rules ArmedAssault.info Forum Rules
 
Reply to this topicStart new topic
> How to create a marker on desired map position using OnMapSingleClick?, Won't work!
SGJackson
post 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!
 
Quote Post
Imutep
post May 23 2010, 00:12
Post #2


ArmAdeus
Group Icon

Group: Administrators
Posts: 147
Joined: 30-January 07
From: München
Member No.: 559



Try this wink.gif

QUELLTEXT
"NameMarker" setMarkerPos [0,0];
onMapSingleClick "Anything move _pos;""NameMarker"" setMarkerPos _pos"; true;"
onMapSingleClick '';


--------------------

German Mission Editing && Scripting Website
 
Quote Post
SGJackson
post 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 tongue.gif

I really appreciate your answer.. just need to straight those things up tongue.gif

Best Regards, SGJackson!
 
Quote Post
Imutep
post May 23 2010, 00:57
Post #4


ArmAdeus
Group Icon

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 '';


--------------------

German Mission Editing && Scripting Website
 
Quote Post
SGJackson
post 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 sad.gif
 
Quote Post

Reply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 19th April 2024 - 12:10