Nexus6 0 Posted June 26, 2003 Hi, Red. Still doesn't want to camera target the first vehicle. I will try adjusting the time limit as you specified in the previous mail. vehiclecamstop = false, is what the default is set to. Just seems if I set a trigger or waypoint and the value is returned false then the camera stop will not activate. But then at present it moves straight to the second camera. Maybe this script is only meant to be called once and to view another vehicle you have to call a second script and so on. Thanks again though. Share this post Link to post Share on other sites
RED 0 Posted June 27, 2003 That would be one option, I tested the script above and it worked fine. Post the whole script you are using please. RED Share this post Link to post Share on other sites
Nexus6 0 Posted June 27, 2003 Hi, Red this is the script complete. Thanks setacctime 0.4 0 fadesound 0 titlecut ["Welcome to NAM", "black in", 15] _cam = "camera" camcreate [0,0,0] _cam cameraeffect ["internal","back"] ;=== Napalm Opening _cam camSetTarget [70488.81,86222.34,3269.88] _cam camSetPos [9698.44,6888.14,11.65] _cam camSetFOV 0.164 _cam camCommit 0 ~40 ;=== Troops titlecut ["1967 and 500,000 US Troops are based in South East Asia", "black in", 4] _cam camSetTarget ap _cam camSetPos [11103.23,6742.57,1.99] _cam camSetFOV 0.050 _cam camCommit 0 ~10 ;=== Boat titlecut ["The US Navy is heavily involved in Riverine Operations to stem the flow of supplies from North Vietnam to the South", "black in", 4] _cam camSetTarget pbr3 _cam camSetPos [8798.84,4904.63,2.27] _cam camSetFOV 0.057 _cam camCommit 0 ~12 ;=== Tanks titlecut ["Search and Destroy Missions have replaced the early pitched battles fought against the North Vietnamese and Vietcong","black in", 4] _cam camSetTarget [6282.03,6123.18,0.00] _cam camSetPos [6342.76,6043.66,3.29] _cam camSetFOV 0.250 _cam camCommit 0 ~10 ;=== huey6 titlecut ["Helicopters form the mainstay of US Military Support,","black in", 5] _unit = huey6 _offset = [40,40,2] _timelimit = 0.5 _initialtime=daytime _camoffsetX = (_offset) select 0 _camoffsetY = (_offset) select 1 _camoffsetZ = (_offset) select 2 _camrelative = true vehiclecamstop = false #loop _actualtime=daytime _runtime=_runtime + 0.005 _newpos = getpos huey6 ? NOT(_camrelative) : _cam camsetpos [(_newpos select 0) + _camoffsetX, (_newpos select 1) +_camoffsetY, (_newpos select 2) + _camoffsetZ]; goto "commit" _cam camsetTarget huey6 _cam camsetrelpos [_camoffsetX, _camoffsetY, _camoffsetZ] #commit _cam camcommit 0 _cam camsetTarget huey6 _cam camcommit 0 ~0.005 ? (NOT(vehiclecamstop) AND (alive _unit) AND (_runtime<_timelimit)): goto "loop" ;=== huey7 _unit = huey7 _offset = [40,40,2] _timelimit = 1 _initialtime=daytime _camoffsetX = (_offset) select 0 _camoffsetY = (_offset) select 1 _camoffsetZ = (_offset) select 2 _camrelative = true vehiclecamstop = false _runtime = 0 #loop2 _actualtime=daytime _runtime=_runtime + 0.005 _newpos = getpos huey7 ? NOT(_camrelative) : _cam camsetpos [(_newpos select 0) + _camoffsetX, (_newpos select 1) + _camoffsetY, (_newpos select 2) + _camoffsetZ]; goto "commit2" _cam camsetTarget huey7 _cam camsetrelpos [_camoffsetX, _camoffsetY, _camoffsetZ] #commit2 _cam camcommit 0 _cam camsetTarget huey7 _cam camcommit 0 ~0.005 ? (NOT(vehiclecamstop) AND (alive _unit) AND (_runtime<_timelimit)): goto "loop2" Share this post Link to post Share on other sites
RED 0 Posted June 28, 2003 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> setacctime 0.4 0 fadesound 0 titlecut ["Welcome to NAM", "black in", 15] _cam = "camera" camcreate [0,0,0] _cam cameraeffect ["internal","back"] ;=== Napalm Opening _cam camSetTarget [70488.81,86222.34,3269.88] _cam camSetPos [9698.44,6888.14,11.65] _cam camSetFOV 0.164 _cam camCommit 0 ~40 ;=== Troops titlecut ["1967 and 500,000 US Troops are based in South East Asia", "black in", 4] _cam camSetTarget ap _cam camSetPos [11103.23,6742.57,1.99] _cam camSetFOV 0.050 _cam camCommit 0 ~10 ;=== Boat titlecut ["The US Navy is heavily involved in Riverine Operations to stem the flow of supplies from North Vietnam to the South", "black in", 4] _cam camSetTarget pbr3 _cam camSetPos [8798.84,4904.63,2.27] _cam camSetFOV 0.057 _cam camCommit 0 ~12 ;=== Tanks titlecut ["Search and Destroy Missions have replaced the early pitched battles fought against the North Vietnamese and Vietcong","black in", 4] _cam camSetTarget [6282.03,6123.18,0.00] _cam camSetPos [6342.76,6043.66,3.29] _cam camSetFOV 0.250 _cam camCommit 0 ~10 ;=== huey6 titlecut ["Helicopters form the mainstay of US Military Support,","black in", 5] _unit = huey6 _offset = [40,40,2] _timelimit = 0.5 _initialtime=daytime _camoffsetX = (_offset) select 0 _camoffsetY = (_offset) select 1 _camoffsetZ = (_offset) select 2 _camrelative = true vehiclecamstop = false _runtime = 0 #loop _actualtime=daytime _runtime=_runtime + 0.005 _newpos = getpos huey6 ? NOT(_camrelative) : _cam camsetpos [(_newpos select 0) + _camoffsetX, (_newpos select 1) +_camoffsetY, (_newpos select 2) + _camoffsetZ]; goto "commit" _cam camsetTarget huey6 _cam camsetrelpos [_camoffsetX, _camoffsetY, _camoffsetZ] #commit _cam camcommit 0 _cam camsetTarget huey6 _cam camcommit 0 ~0.005 ? (NOT(vehiclecamstop) AND (alive _unit) AND (_runtime<_timelimit)): goto "loop" ;=== huey7 _unit = huey7 _offset = [40,40,2] _timelimit = 1 _initialtime=daytime _camoffsetX = (_offset) select 0 _camoffsetY = (_offset) select 1 _camoffsetZ = (_offset) select 2 _camrelative = true vehiclecamstop = false _runtime = 0 #loop2 _actualtime=daytime _runtime=_runtime + 0.005 _newpos = getpos huey7 ? NOT(_camrelative) : _cam camsetpos [(_newpos select 0) + _camoffsetX, (_newpos select 1) + _camoffsetY, (_newpos select 2) + _camoffsetZ]; goto "commit2" _cam camsetTarget huey7 _cam camsetrelpos [_camoffsetX, _camoffsetY, _camoffsetZ] #commit2 _cam camcommit 0 _cam camsetTarget huey7 _cam camcommit 0 ~0.005 ? (NOT(vehiclecamstop) AND (alive _unit) AND (_runtime<_timelimit)): goto "loop2" If this does not work I will cry RED Share this post Link to post Share on other sites
Nexus6 0 Posted June 30, 2003 Hi Red, seems ok now. Targets the choppers before moving to the hercules. _timelimit = 0.5 Thats what it is set to, I have altered this to 0.9 it gives a little more time for the text and the choppers to be viewed. One thing, what variables will thie field except? could I put 1.0, or 1 or 0.09. Just want to know how the array should be formed. And what is the difference between _timelimit and _runtime=(_actualtime-_initialtime) Thanks again RED> Nexus6 Share this post Link to post Share on other sites
RED 0 Posted June 30, 2003 You can put any number you want into the _timelimit variable, for example _timelimit = 10 will give you 100 seconds. 0.09 would give you 0.9 seconds. _timelimit is how long the script will stay in the corresponding loop for, _runtime is the time the script has been running. RED Share this post Link to post Share on other sites