OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: AnarCHy on 30 Sep 2004, 06:26:51
-
as all of you dont know, I am not not making a good mission named Attack! on sarugao
it involves the addons:
UA (unified artillery)
BAS Deltas/rangers 1.55
BAS Littlebirds
Tomahawk addons (no not the CoC Tomahawk, it is rare and hard to find mine is)
All I need is some help with a script I am trying to modify, a built-n one called 'camera.sqs', which is bsically a tool used for better camera angles in cutscenes etcetera. here it is:
_ppos = getPos _this
_px=_ppos select 0
_pz=_ppos select 1
_camera = "camera" camCreate [_px+1, _pz+1, 2 ]
_camera camCommand "manual on"
_camera camCommand "inertia off"
_camera cameraEffect ["internal","back"]
; wait until destroy is forced or camera auto-destroyed
@cheat0 || _camera!=_camera
aP cameraEffect ["terminate","back"]
camDestroy _camera
what I need to know is how to change the script from global variables to local ones, with the exceptions of the needed globals, so I can run the script on client-side only of the server, not the entire server starts camera.sqs when one guy dies. I just need to know soon, thanks
p.s. I have little knowledge in the world of MP editing, so if anything in this post is stupid or seems rather basic, I would appreciate if you would point it out ofr me :P
thanks again,
AnarCHy
-
Dont change the script at all, simply run the script on only that one persons computer.
? Local Player1 : Player1 exec "camera.sqs"
will make ONLY player1 exec the script, and thus he will only see the camera. You dont have to worry about any of the global or local vars in the script interfering :)
-
oh yeah...and the guy has to die before the script runs :P shoulda mentioned that in my first post, sorry. the script code works and everything, but when I put it in there it execs it right away, and it isnt the greatest thing :P
lil more help :P
thanks though for that, it will help with a few other things...
AnarCHy
-
Where are you exec'ing it exactly? script? trigger? If its a trigger then just use ! Alive Unitname AND local Unitname and in the activation field put that other line of code
-
thanks I got it working!