Rommel 2 Posted February 22, 2005 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;BarrageArea.sqs - script to Barrage a Triggered area ;make a tigger ;call this script on activate or deactivate: ;[ID,Type,#shells,Xrange,Yrange,starting height,minimum time, variable time] exec "BarrageArea.sqs" _tag = _this select 0 _objtype = _this select 1 _amount = _this select 2 _randomX = _this select 3 _randomY = _this select 4 _height = _this select 5 _timemin = _this select 6 _timev = _this select 7 _offsetX = _randomX / 2 _offsetY = _randomY / 2 _height = _this select 4 _tX = getpos _tag select 0 _tY = getpos _tag select 1 _tZ = getpos _tag select 2 #Loop ? (_amount < 1 ) : exit _obj = _objtype CamCreate[((_tX+Random _randomX)-_offsetX),((_tY+Random _randomY)-_offsetY),_tZ+_height] _amount = _amount - 1 ~(_timemin+(random _timev)) goto "Loop" Examples: [Fortress1,"Shell73",50,50,100,300,0,.7] exec "BarrageArea.sqs" [smokeArea,"Smoke",50,50,100,300,0,.7] exec "BarrageArea.sqs" Share this post Link to post Share on other sites