OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Pravit on 18 Jul 2005, 18:32:18
-
From what I understand, the camcreate, camsettarget, and so on commands are local, so I will have to run a script to do a cutscene on every computer. My concern is about the various "move" commands that I use in the cutscene. If each player runs a script telling the AI to move to a specific place, will he get that order more than once? Can this screw up a cutscene's timing? Or should I instead handle all move commands from a server-side script, and only do camera movement client-side? Thanks.
-
If the ai is local to the server (eg not having a player as group leader) then issue these move commands on the server
run all camera commands on ?(local player):
if the ai is local to a player then use
if ((local player) && (leader groupname == Player))then{type command here}
or run a piece of code like the following
?(local player):_iamplayer = true
?(_iamplayer): add command here
?(_iamplayer): add command here
or
_iamplayer = false
if ((local player) && (leader groupname == Player))then{_iamplayer = true}
?(_iamplayer): add command here
?(_iamplayer): add command here
?(_iamplayer): add command here
using ?(local player): will allow you to preview when running a clientside test
whereas
?!(local server): will not allow a full preview unless running from a dedicated server and connecting as a client
(Use of (local server) requires the creation of a gamelogic which you would name "server"
-
Right, that works, thanks Terox.