EACC 10 Posted June 5, 2011 Hi! :) I have a problem with onmapsingleclick. When you have activated it you can press on the map tons of times and place artillery there but is there a way to like... turn it off? >.< Here the codes btw! Launch.sqs: ?!local player : exit player Sidechat "Click on map"; onMapSingleClick "[_Shift, _Pos] exec ""Radio\Cluster.sqs""; True"; Cluster.sqs: #Bomb ?Bombbusy : Player sidechat "Artillery is busy!"; exit Bombbusy = true publicvariable "Bombbusy" Cash = Cash - 500 player sidechat format ["your cash is now %1",Cash] player sidechat "Estimated impact: 25 seconds!" ~25 player sidechat "SPLASH!" _Pos = _This select 1 _Launcher = "Logic" Camcreate [0,0,0]; _Launcher setpos (_pos) _Bomb1 = "Laserguidedbomb" _Bomblet = "Heat73" _Many = 20 #Firststage _explosion = Getpos _Launcher _cx = _explosion select 0 _cy = _explosion select 1 _cz = _explosion select 2 _RH = Random 100 + 200 _tempObj = _bomb1 camCreate [_cx, (_cy) - 10, (_Cz) + _RH] _RX = Random 10 - 5 _RY = Random 10 - 5 _RZ = Random 40 + 60 _tempObj setVelocity [_RX, _RY, -_RZ] #60 _RH2 = Random 10 + 90 ?getpos _tempobj select 2 < _RH2 :goto "boom" ~0.01 goto "60" #Boom _tempObj setVelocity [0, 0, 0] _explosion2 = getpos _Tempobj _Cx2 = _explosion2 select 0 _Cy2 = _explosion2 select 1 _Cz2 = _explosion2 select 2 _tempObj2 = _bomb1 camCreate [_cx2, _cy2, _Cz2] _Count = 0 #secondStage ~0.000001 ?_count == _Many : goto "Exit" _SRX = random 190 - 95 _SRY = random 190 - 95 _SRZ = random 40 + 180 _CxR2 = _CX2 + random 3 + 6 _CyR2 = _CY2 + random 3 + 6 _CzR2 = _CZ2 + random 1 + 2 _tempObj = _Bomblet camCreate [_CXR2, _CYR2, _CZR2] _tempObj setVelocity [_SRX, _SRY, -_SRZ] _Count = _count + 1 goto "secondstage" #Exit Bombbusy = false publicvariable "Bombbusy" deletevehicle _Launcher exit Have a nice weekend! ;) //EACC Share this post Link to post Share on other sites
ww2weasel 10 Posted June 6, 2011 ?_count == _Many : goto "Exit" _Many = 20 - change to how many times you want to call artillery.... Share this post Link to post Share on other sites
Pulverizer 1 Posted June 6, 2011 To return normal map click: onMapSingleClick "false" You should add it to cluster.sqs after the ?Bombbusy check. Share this post Link to post Share on other sites
EACC 10 Posted July 6, 2011 Thank you all! Sorry for really late reply! :) // EACC Share this post Link to post Share on other sites