Hi all,
Working on a dog tracking script and YES I know .sqs is obsolete, but this script is so simple it won't matter and I always start by making my scripts in .sqs before implementing them in .sqf anyway
What I'm worried about is if the unit name "trackDog1" will be recognized by all clients and thus making everyone hear the barking effect.
The script works through the init field of a unit that is deleted and replaced by a dog. The script is called by: [this] exec "dogtrackingparty.sqs", which looks like this:
_dummy = _this select 0
_trackers = group _dummy
deleteVehicle _dummy
~ 1
? isServer : trackDog1 = _trackers createUnit ["Pastor", position leader _trackers, [], 0, "FORM"]; publicVariable "trackDog1"
[trackDog1] join grpNull
trackDog1 joinAs [_trackers, 2]
~ 1
trackDog1 setskill 1
trackDog1 setSpeedMode "FULL"
trackDog1 allowFleeing 0
~ 1
[trackDog1] exec "dogBark.sqs"
? ! isServer : exit
#choice
_preyNum = count preyList
_preyChoice = floor random _preyNum
_chosenPrey = preyList select _preyChoice
#trackloop
? ! (alive trackDog1) : exit
_trackers move getpos _chosenPrey
@ unitReady leader _trackers
if (! (alive _chosenPrey)) then {goto "choice"} else {goto "trackloop"}
The: [trackDog1] exec "dogBark.sqs" must be recognized by all clients... Will it be?
Thanks in advance... and please no jokes about .sqs
Laggy