Home   Help Search Login Register  

Author Topic: SOLVED: Script calling for both players  (Read 1485 times)

0 Members and 1 Guest are viewing this topic.

Offline corrupt3d_Oracle

  • Members
  • *
  • I'm a llama!
SOLVED: Script calling for both players
« on: 09 Aug 2007, 04:56:57 »
I took Kronzky's portable target range script and tried to make it compatible for my friend and I online.
Link here (http://www.armaholic.com/page.php?id=1262)

Unfortunately, it creates 2 of each target. One pair for me and another for my friend. I thought it had to do with the 'player' words in the sqf included (targetrange.sqf). I took that out and replaced it with specific names (spotter for myself and sniper for my friend)...but it still does this.

Is there a way (calling from a trigger or elsewhere) to call this and only have the 1 group spawn rather than 1 group for each of us?

Thanks again guys,

Corrupt3d

(I will post scripts if necessary, but I thought it was mainly a theory question that could be explained)
« Last Edit: 14 Aug 2007, 19:44:46 by corrupt3d_Oracle »

Offline DarkNova

  • Members
  • *
Re: Script calling for both players
« Reply #1 on: 11 Aug 2007, 10:31:46 »

sounds like you're executing code on the server and the client instead of just the server/host

use the command IsServer so the create code is only executed on the server/host

multiplayer scripting examples here:

http://community.bistudio.com/wiki/Multiplayer_scripting#Examples


Offline corrupt3d_Oracle

  • Members
  • *
  • I'm a llama!
Re: Script calling for both players
« Reply #2 on: 14 Aug 2007, 19:44:32 »
Worked like a charm (modifying it for sqf instead of sqs at least).

All I had to do was add the following to the beginning of the script and it worked fine.
Code: [Select]
if (!isServer) exitWith {};

Thanks again,
Corrupt3d