strike277 0 Posted December 13, 2007 How do I make a camera follow the terrain? In the start of the game it shows the camera moving over the water towards the island. How can I do this? thanks Share this post Link to post Share on other sites
zaphod 0 Posted December 13, 2007 place empty (invisible) markers the cam should follow, and animate the cam sequence from marker to marker... Share this post Link to post Share on other sites
strike277 0 Posted December 13, 2007 Thanks for the reply. How do I animate the sequence? Not sure how to do that. thanks Share this post Link to post Share on other sites
strike277 0 Posted December 14, 2007 useCamera = true _c = "camera" camCreate getPos mk_start _cam camSetPos [getMarkerPos "mk_start" select 0, getMarkerPos "mk_start" select 1, 20]; _cam camSetTarget [getMarkerPos "mk_end" select 0, getMarkerPos "mk_end" select 1, 20]; _cam camCommit 0; _cam camSetPos [getMarkerPos "mk_end" select 0, getMarkerPos "mk_end" select 1, 20]; _cam camCommit 30; sleep 25; camDestroy _c This is the code I tried to use, but it gave me an error with the sleep 25; init. I took it out, got no error, but no camera either. I set up two game logic markers and named one mk_start and the other mk_end. Sorry, but i'm a newbie at this if ya cant tell. Share this post Link to post Share on other sites
TRexian 0 Posted December 14, 2007 Try with a semicolon ";" after the camdestroy command. (It is like PASCAL. "Place A SemiColon All Locations.") Share this post Link to post Share on other sites
zaphod 0 Posted December 14, 2007 you create a camera _c, but you go on with _cam later ... this mustn't happen and yes, don't forget semikolons at end of terms; <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _cam="camera" camCreate getPos mk_start; _cam camSetPos [getMarkerPos "mk_start" select 0, getMarkerPos "mk_start" select 1, 20]; _cam camSetTarget [getMarkerPos "mk_end" select 0, getMarkerPos "mk_end" select 1, 20]; _cam camCommit 0; _cam camSetPos [getMarkerPos "mk_end" select 0, getMarkerPos "mk_end" select 1, 20]; _cam camCommit 30; sleep 30; camDestroy _cam; Share this post Link to post Share on other sites
strike277 0 Posted December 14, 2007 Still getting an error on the sleep command. |#sleep 30;| Generic error in command. code I'm using below. Quote[/b] ]useCamera = true_cam="camera" camCreate getPos mk_start; _cam camSetPos [getMarkerPos "mk_start" select 0, getMarkerPos "mk_start" select 1, 20]; _cam camSetTarget [getMarkerPos "mk_end" select 0, getMarkerPos "mk_end" select 1, 20]; _cam camCommit 0; _cam camSetPos [getMarkerPos "mk_end" select 0, getMarkerPos "mk_end" select 1, 20]; _cam camCommit 30; sleep 30; camDestroy _cam; Share this post Link to post Share on other sites
Lou Montana 101 Posted December 14, 2007 sleep is used in sqf scripts. if you're using sqs, use instead ~30 Share this post Link to post Share on other sites
strike277 0 Posted December 15, 2007 I changed the sleep 30 to ~30. Got the same error. Not even close to sure whats going on. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">useCamera = true _cam="camera" camCreate getPos mk_start; _cam camSetPos [getMarkerPos "mk_start" select 0, getMarkerPos "mk_start" select 1, 20]; _cam camSetTarget [getMarkerPos "mk_end" select 0, getMarkerPos "mk_end" select 1, 20]; _cam camCommit 0; _cam camSetPos [getMarkerPos "mk_end" select 0, getMarkerPos "mk_end" select 1, 20]; _cam camCommit 30; ~ 30; camDestroy _cam; Share this post Link to post Share on other sites
strike277 0 Posted December 15, 2007 May be I'm focusing on the wrong thing here. As stated I'm using the above listed code. I get the |#30| generic error upon it loading in. I does not go to cam view, but first person. Along with the code I've set down two markers mk_start and mk_end as well as a game logic with the exec command for the script. Am I missing something? Share this post Link to post Share on other sites
d3nn16 3 Posted December 22, 2007 maybe remove the semicolon after ~30 ? Share this post Link to post Share on other sites
=Odin= 0 Posted December 22, 2007 Try adding this the line before camdestroy Quote[/b] ]cameraEffect ["Terminate", "Back"] so it should look like this Quote[/b] ]useCamera = true_cam="camera" camCreate getPos mk_start; _cam camSetPos [getMarkerPos "mk_start" select 0, getMarkerPos "mk_start" select 1, 20]; _cam camSetTarget [getMarkerPos "mk_end" select 0, getMarkerPos "mk_end" select 1, 20]; _cam camCommit 0; _cam camSetPos [getMarkerPos "mk_end" select 0, getMarkerPos "mk_end" select 1, 20]; _cam camCommit 30; ~ 30; cameraEffect ["Terminate", "Back"]; camDestroy _cam; Hope it helps Share this post Link to post Share on other sites
strike277 0 Posted December 22, 2007 It still does'nt work,Same error using the script provided. Share this post Link to post Share on other sites
zolop 0 Posted April 11, 2008 If I could offer advice I would, but I also need help making this kind of script except locking onto the target but animating the camera to move around the object. So I bump this because it will also help me to create my camera script. Share this post Link to post Share on other sites
kronzky 5 Posted April 12, 2008 It still does'nt work,Same error using the script provided. There's also a semicolon missing in the first line: useCamera = true Share this post Link to post Share on other sites