Home   Help Search Login Register  

Author Topic: mapclick  (Read 992 times)

0 Members and 1 Guest are viewing this topic.

Offline Killzone

  • Members
  • *
  • War is the true Enemy
mapclick
« on: 16 Dec 2005, 18:43:06 »
Hi

I am trying to use the mapclick feature to move a marker so that I can have a heli go to that marker. My problem is if I dont click the map fast enough it starts the rest of the script before I have even clicked the map.

I remember there was a map click where it would wait for me (no matter how long) to click the map before moving on. This is the one I am using but its not right

Hint "Click Map for Repel Zone"; onMapSingleClick {heli setPos _pos; variable1=true; onMapSingleClick {}};player sidechat "roger that"

One should I be using?

Thanks ;D
"Everyone dies so deal with it and move on"

                                                      ME

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:mapclick
« Reply #1 on: 16 Dec 2005, 19:02:11 »
Hint "Click Map for Repel Zone"
onMapSingleClick {heli setPos _pos; variable1=true; onMapSingleClick {}}
@variable1
player sidechat "roger that"
Plenty of reviewed ArmA missions for you to play

Offline Meatball0311

  • Members
  • *
Re:mapclick
« Reply #2 on: 17 Dec 2005, 03:00:01 »
Hey where do you put that into a script? or what?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:mapclick
« Reply #3 on: 17 Dec 2005, 12:02:43 »
it could go into a script, but from the look of the first example it's in a trigger's on activation field - going by all the semi-colons...


Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:mapclick
« Reply #4 on: 17 Dec 2005, 12:03:04 »
Yes.  Although I'm normally the first to recommend triggers or waypoints over scripts, in the case of mapclick - which is slightly tricky to work with - I would recommend a script simply because that gives you the most space to work with.  It's easier if you can see what's going on.

Your current problem is that the script does not pause to wait for the player to click, it just keeps going.    You need to add the @ command so that the script waits for the player to click.  
Plenty of reviewed ArmA missions for you to play