themoffster 0 Posted April 3, 2002 I have a few lines in my script that put fires inside a blackhawk so that you can`t see them. However, that is fine when the blackhwak points in a certain direction, but turn it slightly and the fires are sitcking out the sides. My lines of code are: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">fire1 setpos [(getpos helo1 select 0),(getpos helo1 select 1) -1.1,(getpos helo1 select 2) +1] fire2 setpos [(getpos helo1 select 0),(getpos helo1 select 1) -1.1,(getpos helo1 select 2) +1] fire3 setpos [(getpos helo1 select 0),(getpos helo1 select 1) -1.1,(getpos helo1 select 2) +1.3]<span id='postcolor'> As you can imaging when the helo is looking East that will work fine, but if it is turned, say to face North, the games axes stay where they were so instead of putting a fire back along the y-axis, (which if the chopper was facing East would be stright along the body of it), it puts the fire 1.1meters out the side of it. I hope you understand this problem, as it`s quite complicated. I have a feeling it will have to involve cosines. Share this post Link to post Share on other sites
Bart.Jan 0 Posted April 3, 2002 Run script after heli is destroyed + few second after it. Heli must be placed on flat ground without near obstacles beacuse of wreck moving. </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_dir=getdir helo1 _x=-1.1*sin _dir _y=-1.1*cos _dir fire1 setpos [(getpos helo1 select 0)+_x,(getpos helo1 select 1) +_y,(getpos helo1 select 2) +1] fire2 setpos [(getpos helo1 select 0)+_x,(getpos helo1 select 1) +_y,(getpos helo1 select 2) +1] fire3 setpos [(getpos helo1 select 0)+_x,(getpos helo1 select 1) +_y,(getpos helo1 select 2) +1.3]<span id='postcolor'> If you'll use this, mention me in credists. Share this post Link to post Share on other sites