OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: solo1zone on 26 Apr 2003, 08:55:11

Title: Markers that follow players on Map
Post by: solo1zone on 26 Apr 2003, 08:55:11
I have been toiling with a script that I can't seem to get working? I am doing a mulitplayer game and I want the team to only see a marker moving around the map to specify the group players locations.

in my player init: i have [this,EComMarker] exec "UpdatePlayerMarker.sqs"

** EComMarker is the name of the Marker on the map a "Dot"

UpdatePlayerMarker.sqs

_player = _this select 0
_playermarker = _this select 1
~0.5
#Repeat
_playermarker setPos [getpos _player select 0, getpos _player select 1]
~3
goto "Repeat"

Any help would be greatly appreciated.......
Title: Re:Markers that follow players on Map
Post by: toadlife on 26 Apr 2003, 10:12:08
use "setmarkerpos" instead of "setpos" ;)

Also make sure you enclose the marker names in quotes when initializing the script.

[player,"markername"] exec "markermove.sqs"

Code: [Select]
_player = _this select 0
_playermarker = _this select 1
~0.5
#Repeat
_playermarker setmarkerPos getpos _player
~3
goto "Repeat"
Title: Re:Markers that follow players on Map
Post by: solo1zone on 26 Apr 2003, 19:53:06
Toadlife....thanks a million....your input works like a charm...... I just added hidemarkes from side script, to the init.sqs and this is looking great...thanks again... ;D


SAMPLE MARKER FOLLOWERS
in my player init: i have [this,"EComMarker"] exec "UpdatePlayerMarker.sqs"

** "EComMarker" is the name of the Marker on the map a "Dot"

UpdatePlayerMarker.sqs

_player = _this select 0
_playermarker = _this select 1
~0.5
#Repeat
_playermarker setmarkerpos [getpos _player select 0, getpos _player select 1]
~3
goto "Repeat"