Home   Help Search Login Register  

Author Topic: variables  (Read 482 times)

0 Members and 1 Guest are viewing this topic.

hashmus

  • Guest
variables
« on: 01 Jan 2003, 19:22:04 »
i want the position of marker1 saved as x and z but i cant find out how... ive tried like this:
getMarkerPos marker1 == [x,z]
but it doesnt work... what then???
« Last Edit: 01 Jan 2003, 19:25:12 by hashmus »

MorMel

  • Guest
Re:variables
« Reply #1 on: 02 Jan 2003, 00:06:43 »
I didn't quite understood what you want, bur you can store a marker's position through this way:

(in a script)
***
_x = GetMarkerPos "marker1" select 0
_y = GetMarkerPos "marker1" select 1
_z = GetMarkerPos "marker1" select 2
***
-the variables don't realy need to be z, y or x...

(I'm not sure if the command position is the right one, but i think it works!) :-\

hashmus

  • Guest
Re:variables
« Reply #2 on: 02 Jan 2003, 18:55:18 »
i want to make a marker on my map... i want this marker to be moved around on the players command... one is to move by draggin it with mouse but i dont know how to do that... then i thought about using radiocommands...
on alpha command: [x,z](from getmarkerposition) "store as" [x,z+10]... is it possible??

Offline Ranger

  • Members
  • *
  • Hoo-ah!
Re:variables
« Reply #3 on: 02 Jan 2003, 20:13:29 »
If you have Resistance, you can use the onMapSingleClick command.

In your init.sqs, put the following code:

Code: [Select]
onMapSingleClick {"Marker1" setMarkerPos _pos}
This sets the position of Marker1 to the location on the map where the player clicked.  Good luck!  8)
« Last Edit: 02 Jan 2003, 20:14:47 by Ranger »
Ranger