Messiah 2 Posted March 30, 2006 well, its not working full stop - I'm making a stunt plane, one of those Russian SU29 jobbies. To create smoke it introduces oil into the exhausts at the front of the aircraft (the exhausts sit either side of the bump under the engine) what im trying to is create two plumes of smoke starting at the two exhausts, and then merge into one plume that follows the length of the fuselage and then billows behind the plane. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#top ?!(alive _this) : exit ?!(isengineon _this) : exit #smoke" Drop ["cl_basic","","Billboard",0.2,20,[0,0,0],[0,0,0],10,2,1,0.2,[0.1,1,2],[[0.9373,0.9373,0.9373,1]],[0,1,1],0.7,0.3,"","",] ?!(isengineon _this) : exit ?!(alive _this) : exit ~.4 goto "smoke" this is executed through an engine eventhandler for now, eventually it will be done via an on off system, but im trying to get it work initially. it says error invalid number in expression - but this is my first day with the drop command, and i was using the drop command utilitly to create the code, so its beyond me whats up... could any kind hearted soul please off some kind of soultion to what im trying to achieve - the drop command seems to be the most complicated scripting in ofp to date. Share this post Link to post Share on other sites
UNN 0 Posted March 30, 2006 Hi, Couple of things I noticed: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#smoke" Not sure if that quote will cause as error, but best setting it to: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#smoke" The drop command is missiong the last parameter. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Drop ["cl_basic","","Billboard",0.2,20,[0,0,0],[0,0,0],10,2,1,0.2,[0.1,1,2],[[0.9373,0.9373,0.9373,1]],[0,1,1],0.7,0.3,"","",_This] Although that will make the particle drop from the objects centre. For the dual exhaust, perhaps it would be better spawning your particles from two points defined in the memory LOD. Using two drop commands for each exhaust. Only I can't remember off hand, how you set that up with the drop command. Share this post Link to post Share on other sites
Messiah 2 Posted March 30, 2006 ok... thats obviously the bit i missed - lol as for the two exhausts, i was going to just duplicate the drop command in the script but set them next to the exhausts. too much lag? Share this post Link to post Share on other sites
UNN 0 Posted March 30, 2006 Not sure about the lag, but you could always try spreading the load a little. If you think it is to much. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#top ?!(alive _this) : exit ?!(isengineon _this) : exit #smoke Drop ["cl_basic","","Billboard",0.2,20,[0,0,0],[0,0,0],10,2,1,0.2,[0.1,1,2],[[0.9373,0.9373,0.9373,1]],[0,1,1],0.7,0.3,"","",_This] ~.2 Drop ["cl_basic","","Billboard",0.2,20,[0,0,0],[0,0,0],10,2,1,0.2,[0.1,1,2],[[0.9373,0.9373,0.9373,1]],[0,1,1],0.7,0.3,"","",_This] ~.2 ?!(isengineon _this) : exit ?!(alive _this) : exit goto "smoke" I'm sure you put the reference to a vertex selection in one of the empty string parameters. I just can't remember which one You might need to change the script for MP to. Something that starts running it on all the clients from the addons init event. Then turns the somke on using a mp firendly switch. Like the presence of a special ammo type or something? Share this post Link to post Share on other sites
h - 169 Posted March 31, 2006 Isn't that kinda obvious UNN: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Drop ["cl_basic","","Billboard",0.2,20,<selection name>,[0,0,0],10,2,1,0.2,[0.1,1,2],[[0.9373,0.9373,0.9373,1]],[0,1,1],0.7,0.3,"","",_This] So for example if the vehicle has the selection 'engine': <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Drop ["cl_basic","","Billboard",0.2,20,"engine",[0,0,0],10,2,1,0.2,[0.1,1,2],[[0.9373,0.9373,0.9373,1]],[0,1,1],0.7,0.3,"","",_This] But using the named selection way you must use the vehicle as the last parameter in the drop array. Of course in this case you need to use it anyway, but just reminding.. Quote[/b] ]from two points defined in the memory LOD. Doesn't need to be in the memory lod... Works on any named selection; proxy, etc.. (afaik).. Share this post Link to post Share on other sites
Messiah 2 Posted March 31, 2006 oooh, useful cheers gents, shall see how it looks - knowing my luck it will look like candyfloss falling out of the back of the exhausts but thats a case of fiddling around with values i suspect Share this post Link to post Share on other sites
Messiah 2 Posted March 31, 2006 the selection thingy didnt work, but the drop command finally did... granted it looks like its snowing behind the vehicle rather than smoke Share this post Link to post Share on other sites
Messiah 2 Posted March 31, 2006 woopi... think im getting somewhere now... the only problem is that it only seems to create the top drop command, the other one simply doesnt appear - i tried changing the name etc, no luck? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#top ?!(alive _this) : exit ?!(isengineon _this) : exit #smoke Drop ["cl_basic","","Billboard",0.01,5,[0.5,1,0],[0,0,-0.01],6.23076,1,1,0.107693,[0.5,10,10],[[0.9373,0.9373,0.9373,1],[0.9373,0.9373,0.9373,1],[ 0.9373,0.9373,0.9373,1],[0.9373,0.9373,0.9373,1]],[0,1,0,1],0.692309,0.267691,"","", _this] ~0.05 ["cl_basic2","","Billboard",0.01,5,[-0.5,1,0],[0,0,-0.0],6.23076,1,1,0.107693,[0.5,10,10],[[0.9373,0.9373,0.9373,1],[0.9373,0.9373,0.9373,1], [0.9373,0.9373,0.9373,1],[0.9373,0.9373,0.9373,1]],[0,1,0,1],0.692309,0.267691,"","", _this] ~0.05 ?!(isengineon _this) : exit ?!(alive _this) : exit goto "smoke" the smoke looks good, although the only problem at the moment is that it has big gaps between it - i think i'll set its forward velocity up a bit so its traveling at some speed when its created Share this post Link to post Share on other sites
Footmunch 0 Posted March 31, 2006 The word-wrapping might have got it wrong, but you've only got one instance of the word 'drop' in there, old chap. The second line is just creating a big old array. To close up the gaps you've got 3 options: 1) Increase the frequency of the smoke (ie reduce the ~0.05 values) so that each 'puff' is closer together. 2) Make the smoke 'bigger' so that the gaps between 'puffs' is reduced. 3) Give the smoke some 'velocity' - this is harder than you might think, as you'll have to take the plane's speed into account as well. Share this post Link to post Share on other sites
Messiah 2 Posted March 31, 2006 d'oh - yes, there was only one 'drop' i could indeed increase the requency, but it caused so much slow down it was unberable... i'll try and make the puffs bigger, but the effect i wanted was it to be a small thick stream going under the fuselage, which then puffed up after the tail - it works fairly well at slow speed, but not so well at high speed. Share this post Link to post Share on other sites
Messiah 2 Posted March 31, 2006 working nicely i reckon now last question, the weight of the particle... does that mean how thick it looks or how much it actually weighs? currently my smoke starts to drop out of the sky after about 5m behind the plane... Share this post Link to post Share on other sites
Footmunch 0 Posted March 31, 2006 Weight and rubbing (oo-err) determine the gravity fall, IIRC. 'Thickness' of the smoke is determined by the alpha values in the colour arrays. Share this post Link to post Share on other sites
Messiah 2 Posted March 31, 2006 cheers matey, shall ammend those values then - i just invented some random value to put in for lack of knowing what it did. Share this post Link to post Share on other sites
h - 169 Posted March 31, 2006 the selection thingy didnt work Well, works fine on some of my stuff, although I'm not actually dropping visible particles with it.. Share this post Link to post Share on other sites
Messiah 2 Posted March 31, 2006 lol - it just complained and threw up errors everywhere - i was happy enough to play trial and error - it sits exactly where it should now -although getting the smoke to sit straight/gently dissepate is hard as hell - it either wants to rise or fall 100m/s, but not stay in one place. Share this post Link to post Share on other sites
wheres my rabbit ? 10 Posted March 31, 2006 Weight and rubbing (oo-err) determine the gravity fall, IIRC.'Thickness' of the smoke is determined by the alpha values in the colour arrays. weight and volume rubbing is how much the wind affects it after its been generated weight 1.27 and volume 1 is neutral and wont go up or down Share this post Link to post Share on other sites
Messiah 2 Posted March 31, 2006 legend mate - thanks Share this post Link to post Share on other sites
mandoble 1 Posted May 5, 2006 Messiah, just some tips: - Your smoke is hot air, so it should go upwards slowly after all, play with volume and weight until you get the best raising rate. - Your smoke gets out of the exhaust at the speed of the plane, so you should modify your particle velocity vector acordingly: [left/right, forward/backward, up/down] components in m/s relative to the direction of the object (your plane). - Your smoke should get less dense slowly, add more color arrays with alpha set to lower values than 1. Share this post Link to post Share on other sites