Home   Help Search Login Register  

Author Topic: Kronzky's Target Range MP  (Read 1333 times)

0 Members and 1 Guest are viewing this topic.

Offline Binary

  • Members
  • *
Kronzky's Target Range MP
« on: 15 Oct 2008, 17:12:25 »
Hello all

I was looking at Kronzky's Movable Target Range (http://kronzky.info/targetrange/index.htm) and was hoping to use it for our clan.
Unfortunately it isn't MP compatible, and currently creates a target range for every player in the mission..

I'm hoping to make it work like this:

Instructor
* Controls Radio
* Control Target Range
* Control Weapon Selection for the trainee

Trainee
* Shoots stuff

I've searched the forums and found a thread that seems much like what i want (http://www.ofpec.com/forum/index.php?topic=29994.0) but i don't quite follow the trail.
I tried adding
Code: [Select]
if (!isServer) exitWith {}; to the top of targetrange.sqf - but that simply makes the script quit upon entering the mission..

Anyone think they can point me in the right direction?
"Ah.. Home sweet hell !" - Al Bundy

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Kronzky's Target Range MP
« Reply #1 on: 17 Oct 2008, 01:36:30 »
Yes, that will stop the script running on the client machines, so just leaving it running it on the server (thus runs ONCE). This would work perfectly as long as the "instructor" was hosting the game, but on a dedicated server, or if you want the trainees to, say, get feedback on their shots, you need to start worrying about a number of MP issues.

You are quite right in seeing that managing a single instructor that has full control and a number of simple trainees is the only reasonable way to fix it for MP (without a complete redesign). Still, this is a non-trivial alteration to make and not one I could throw together quickly.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)