Home   Help Search Login Register  

Author Topic: moveable marker??  (Read 469 times)

0 Members and 1 Guest are viewing this topic.

hashmus

  • Guest
moveable marker??
« on: 02 Jan 2003, 19:16:19 »
i want to make a car that drives to a place that the player decides, but the car should NOT be in group with the player...
ive thought about makin a moveable marker, cause ive learned how to make the car drive to a marker... it could bemoved by dragging it (if possible) or it could be moved by radiocommands:
in a triggers "on activation field":
getmarkerposition marker1 "store as" "variables z and x"; marker1 setmarkerpos [z x+10]
is it possible or should i make it in another way???
perhaps by letting the car join me and then when it is at the right position let it be kicked out from my group... (is it possible??)
THANKS!

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:moveable marker??
« Reply #1 on: 02 Jan 2003, 20:06:30 »
If you have Resistance, the easiest way to do what you want is to use the onMapSingleClick command.  In your init.sqs script, put the following code:

Code: [Select]
onMapSingleClick {car1 doMove _pos}
Whereever the player single clicks on the map, car1 will move there.  Obviously, rename car1 to whatever your car is really called.  Good luck!  :D

Edit: Note that this method does not require the use of markers.  It's far simpler.  If you want to use markers in addition, you can create a script to do more complicated things.
« Last Edit: 02 Jan 2003, 20:08:25 by Ranger »
Ranger