OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: the corinthian on 23 Mar 2005, 15:03:18
-
Hi
I am using the Napalm mod effect in a mission but the huge flames and smoke only show on the server PC and not the clients. Does anyone know why this happens and more importantly is there a fix?
Thanks
-
I think it happens because the Napalm is made using the drop command. The script needs to be started on every computer in the network. How do you start the script? Describe the situation and the triggers involved.
-
I am using a support pack that allows you to call in several types of support from mortars to choppers and planes with bombing runs. I think its the snyper support pack (might be wrong its been a while).
-
I checked and it is inded the Snypir support pack. The napalm airstrike effect is the effect that is most notably missing in MP. From reading around I think this is because the script is runs is just being run on the server and not on the client.
How do I change this please anyone?
-
Hi guys
I found this in snypirs excellent MP editing tutorial
snYpir's MP editing rule 5: You only need to dynamically create objects (using CreateUnit or CreateVehicle) on the server. However, some objects (such as the napalm addon) need to be created on all computers, because they initiate a particle cloud that will not be visible unless created locally.
So this answers my problem however I need to know how to create the objects on all computers instead of just the server. Can anyone advise me how to do this please?
-
Ok I have been looking at Snypirs scripts and have found where the particle cloud is created. To have this created on all the clients I plan on using the Foreach command but I havent used this before and am uncertain how to do this.
; SP/MP Fire Spt Pack
; by snYpir
; this script is by Shogun for the Napalm addon
; modified by snYpir for the Support Pack
_pos = _this
; create the napalm bomb
_bomb = "SNYNapalmBomb" createVehicle _pos
_j = 0
#Loop
   ;If flame is dead then exit script
   ? IsNull _bomb : exit
   _Lista = list detectlaser
   _zoneCount = count _Lista
   ? _j > _zoneCount : _j = 0
   _deadman = _Lista select _j
   ? (_deadman distance _bomb) < 80 && (getpos _deadman select 2) < 20 : _deadman setDammage 1.0
   _j = _j + 1
   ~0.01
goto "Loop"
Where would I use the "forEach units group player" bit in this script? in order to make sure the cloud effect is visible on client PCs? Is it the following line?
_bomb = "SNYNapalmBomb" createVehicle _pos
should read something like
"_bomb = ""SNYNapalmBomb"" createVehicle _pos" ForEach units group player
Please help Im crap at this scripting lark...