freddern 0 Posted December 11, 2003 The snow script by Kegetys is working fine in my custom mission, but I can't se it in my Intro. Maby the snow is attached to the player? In that case how attach it to the camera...? Help please... Here's the script: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ; ; Snowing script v1.0 by Kegetys <Kegetys@raketti.net> ; http://www.ofp.kege.cjb.net ; ; For Winter Nogojev ; ; ; Usage: ; [density] exec "\KEGnoecain_snow\script\snow.sqs" ; ; where density is the density of the snowing. If density is not specified a default of 5 is used. ; Note that the maximum working density is relative to the FPS. ; _velocity = [0,0,-0.61] _density = 5 ? count _this > 0 : _density = _this select 0 #Begin ~0.001 _spawnDist = 35 _spawnHeight = 15 _foo = 0 #luup _posDrop = [(getpos player select 0)-_spawnDist+(random (_spawnDist*2)), (getpos player select 1)-_spawnDist+(random (_spawnDist*2)), Â (getpos player select 2)+_spawnHeight] _posDrop = [(_posDrop select 0)+((velocity vehicle player select 0)*5),(_posDrop select 1)+((velocity vehicle player select 1)*5),_posDrop select 2] drop ["cl_water", "", Â Â Â Â Â Â "Billboard", 1, Â Â Â Â Â 7, Â Â Â _posDrop, _velocity, Â Â 1, Â Â Â Â Â Â Â Â 0.000001, Â 0.000, 1.4, Â Â [0.06,0.06], [[1,1,1,0], [1,1,1,1], [1,1,1,1], [1,1,1,1]], [0,1,0,1,0,1], Â 0.2, Â Â Â Â Â Â Â Â Â 1.2, Â Â Â Â Â Â Â Â Â Â Â "", Â Â Â "", Â Â Â Â Â Â ""] _foo = _foo + 1 ? _foo < _density : goto "luup" goto "Begin" Share this post Link to post Share on other sites
RED 0 Posted December 11, 2003 You will have to execute this script from your camera script, something like: [density,_camera] exec "scriptname" <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ; ; Snowing script v1.0 by Kegetys <Kegetys@raketti.net> ; http://www.ofp.kege.cjb.net ; ; For Winter Nogojev ; ; ; Usage: ; [density] exec "\KEGnoecain_snow\script\snow.sqs" ; ; where density is the density of the snowing. If density is not specified a default of 5 is used. ; Note that the maximum working density is relative to the FPS. ; _playercam = _this select 1 _velocity = [0,0,-0.61] _density = 5 ? count _this > 0 : _density = _this select 0 #Begin ~0.001 _spawnDist = 35 _spawnHeight = 15 _foo = 0 #luup _posDrop = [(getpos _playercam select 0)-_spawnDist+(random (_spawnDist*2)), (getpos _playercam select 1)-_spawnDist+(random (_spawnDist*2)), (getpos _playercam select 2)+_spawnHeight] _posDrop = [(_posDrop select 0)+((velocity vehicle _playercam select 0)*5),(_posDrop select 1)+((velocity vehicle _playercam select 1)*5),_posDrop select 2] drop ["cl_water", "", "Billboard", 1, 7, _posDrop, _velocity, 1, 0.000001, 0.000, 1.4, [0.06,0.06], [[1,1,1,0], [1,1,1,1], [1,1,1,1], [1,1,1,1]], [0,1,0,1,0,1], 0.2, 1.2, "", "", ""] _foo = _foo + 1 ? _foo < _density : goto "luup" goto "Begin" Not tested but I think it should work fine. RED Share this post Link to post Share on other sites
freddern 0 Posted December 11, 2003 it didn't work... I edited the script as u showed me and executed it in my camera script like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> titlecut ["1635 hours Nogojev","BLACK in",10] _cam = "camera" camcreate [0,0,0] _cam cameraeffect ["internal", "back"] _cam camsettarget target _cam camsetrelpos [0,400,220] _cam camcommit 0 _cam camsetrelpos [0,400,12] _cam camcommit 45 ; this is where i exec the script: [500,_camera] exec "snow02.sqs" ; snow02.sqs is the script u showed me ~45 _cam camsettarget p04 _cam camsetrelpos [5,3,0.5] _cam camcommit 10 ~10 _cam camsettarget p03 _cam camsetrelpos [-5,3,0.5] _cam camcommit 5 ~5 _cam camsettarget p03 _cam camsetrelpos [5,3,0.5] _cam camcommit 5 ~1 titlecut [" ","WHITE out",4] ~4 _cam cameraeffect ["terminate", "back"] camdestroy _cam endintro=true exit Thanks for the help by the way.. but it still don't work Share this post Link to post Share on other sites
RED 0 Posted December 11, 2003 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> titlecut ["1635 hours Nogojev","BLACK in",10] _cam = "camera" camcreate [0,0,0] _cam cameraeffect ["internal", "back"] _cam camsettarget target _cam camsetrelpos [0,400,220] _cam camcommit 0 _cam camsetrelpos [0,400,12] _cam camcommit 45 ; this is where i exec the script: [500,_cam] exec "snow02.sqs" ; snow02.sqs is the script u showed me ~45 _cam camsettarget p04 _cam camsetrelpos [5,3,0.5] _cam camcommit 10 ~10 _cam camsettarget p03 _cam camsetrelpos [-5,3,0.5] _cam camcommit 5 ~5 _cam camsettarget p03 _cam camsetrelpos [5,3,0.5] _cam camcommit 5 ~1 titlecut [" ","WHITE out",4] ~4 _cam cameraeffect ["terminate", "back"] camdestroy _cam endintro=true exit Try this, you had to name _camera to the name of your camera, in your case _cam. RED Share this post Link to post Share on other sites
freddern 0 Posted December 11, 2003 I really appreciate your help RED, but this didn't work either. I know some scripting, but this goes beyond my mind.... well well.. Thanks anyway.. Share this post Link to post Share on other sites
RED 0 Posted December 11, 2003 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> titlecut ["1635 hours Nogojev","BLACK in",10] cam = "camera" camcreate [0,0,0] cam cameraeffect ["internal", "back"] cam camsettarget target cam camsetrelpos [0,400,220] cam camcommit 0 cam camsetrelpos [0,400,12] cam camcommit 45 ; this is where i exec the script: ;[500,cam] exec "snow.sqs" ; snow02.sqs is the script u showed me [] exec "follow.sqs" ~45 cam camsettarget p04 cam camsetrelpos [5,3,0.5] cam camcommit 10 ~10 cam camsettarget p03 cam camsetrelpos [-5,3,0.5] cam camcommit 5 ~5 cam camsettarget p03 cam camsetrelpos [5,3,0.5] cam camcommit 5 ~1 titlecut [" ","WHITE out",4] ~4 cam cameraeffect ["terminate", "back"] camdestroy cam endintro=true exit Follow.sqs: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> logiccam = "logic" createvehicle (getpos cam) [500,logiccam] exec "snow.sqs" #loop logiccam setpos (getpos cam) ~0.1 goto "loop" Snow.sqs: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ; ; Snowing script v1.0 by Kegetys <Kegetys@raketti.net> ; http://www.ofp.kege.cjb.net ; ; For Winter Nogojev ; ; ; Usage: ; [density] exec "\KEGnoecain_snow\script\snow.sqs" ; ; where density is the density of the snowing. If density is not specified a default of 5 is used. ; Note that the maximum working density is relative to the FPS. ; _playercam = _this select 1 _velocity = [0,0,-0.61] _density = 5 ? count _this > 0 : _density = _this select 0 #Begin ~0.001 _spawnDist = 35 _spawnHeight = 15 _foo = 0 #luup _posDrop = [(getpos _playercam select 0)-_spawnDist+(random (_spawnDist*2)), (getpos _playercam select 1)-_spawnDist+(random (_spawnDist*2)), (getpos _playercam select 2)+_spawnHeight] _posDrop = [(_posDrop select 0)+((velocity vehicle _playercam select 0)*5),(_posDrop select 1)+((velocity vehicle _playercam select 1)*5),_posDrop select 2] drop ["cl_water", "", "Billboard", 1, 7, _posDrop, _velocity, 1, 0.000001, 0.000, 1.4, [0.06,0.06], [[1,1,1,0], [1,1,1,1], [1,1,1,1], [1,1,1,1]], [0,1,0,1,0,1], 0.2, 1.2, "", "", ""] _foo = _foo + 1 ? _foo < _density : goto "luup" goto "Begin" Tested, and it works fine. RED Share this post Link to post Share on other sites
Skul 0 Posted December 11, 2003 You have to wait a while for the snow to come down. Maybe that's what it is. Are you waiting, or did you just exit almost straight away? [Gareth Gates must die] Share this post Link to post Share on other sites