IntruderDZ 1 Posted June 26, 2002 hi wondering if anyone knows how i can make a camera script that whoever kills anyone in a mission to have the camera focus on that player. Just like when the computer kills u in single player have it focus on the Ai who shot u. I was lookin in the Scripts.pbo and found something i thought was close but dont know how to work it _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 ;init titleCut["", "BLACK IN",1] _player = _this select 0 _killer = _this select 1 _camera = "camera" camCreate [9578.59,3540.29,1.66] _camera cameraEffect ["internal","back"] Maybe there is another script missing that says "_Killer" is a specific person. Can anyone help, how do u specify a random player as a killer and the player who got shot ? Thanx ahead for any replies Share this post Link to post Share on other sites
Spinor 0 Posted June 26, 2002 You are almost right. The scripts onPlayerKilled.sqs onPlayerRespawnAsSeagull.sqs onPlayerRespawnOtherUnit.sqs in the scripts.pbo are AUTOMATICALLY called when the appropriate event happens, e.g. in SP when the player is killed the script "onPlayerKilled.sqs" is executed. Additionally, these scripts are called with the killed player and the killer as arguments (again, automatically). To create your own camera sequence, simply put the respective script in your missions folder (scripts will be searched first in missions folder, then in the campaign folder and finally in the scripts.pbo) and edit it however you want. To get info about the killed and the killer use: _player = _this select 0 _killer = _this select 1 The only thing you must keep in the script is the line enableEndDialog otherwise there will be no end dialog for the player to exit the mission. Hope this helps, Spinor Share this post Link to post Share on other sites
IntruderDZ 1 Posted June 27, 2002 Thanx Spinor, well that proves my theory how do i get those other scripts, do u know how to do it ? see what im trying to do is make a sniper Map and i want to focus a camera on the Winner sniper each Score, there will be about 8 snipers. Share this post Link to post Share on other sites
Spinor 0 Posted June 27, 2002 What other scripts? The scripts listed above are in the scripts.pbo (I think in the "dta" folder of OFP). If you dePBO this you have access to the scripts. Simply put them in your respective missions folder and edit them in any way you want. The problem of these scripts is that they are only executed when a human player is killed. This means you can't use them when an AI unit is killed. Share this post Link to post Share on other sites
bn880 5 Posted August 8, 2002 Wow, I didn't know this info was out there. Also onPlayerResurrect.sqs might do something. I am trying to find a way to call onPlayerKilled for another unit not player... Share this post Link to post Share on other sites