vitoal125 0 Posted December 9, 2001 I tried to do MP's script for artillery, but the script won't loop. One shell falls from the sky and thats it. I think it is a problem with the goto commands, i put them in exactly like MP posted here, is this how they need to be or do I need to change something to make the goto's work? Share this post Link to post Share on other sites
MP 0 Posted December 9, 2001 What script was that? (posted 2 artilary script's up here in the past). _Centre = _this select 0 _area = _this select 1 _guns = _this select 2 _freq = _this select 3 _rounds = _this select 4 _delay = _this select 5 _CentrePos = GetMarkerPos _Centre _cx = _CentrePos select 0 _cy = _CentrePos select 1 _areaX2 = _area * 2 ~_delay _ammoType = "Heat120" #Update ? (ariStop == 1) : goto "End" _a = _guns + 1 _a = _a - 1 #Salvo _tempObj = _ammoType camCreate[_cx + Random(_areaX2) - _area,_cy + Random(_areaX2) - _area,50] ~0.01 ~0.4 _a = _a - 1 _tempObj = objNull ? (_a > 0) : goto "Salvo" _rounds = _rounds - _guns ~_freq - (_guns * 0.4) ? (_rounds > 0) : goto "Update" #End exit Now... that's it perfect Ok... That's my heavy artilary script.... _Centre = _this select 0 _area = _this select 1 _guns = _this select 2 _freq = _this select 3 _rounds = _this select 4 _delay = _this select 5 _CentrePos = GetMarkerPos _Centre _cx = _CentrePos select 0 _cy = _CentrePos select 1 _areaX2 = _area * 2 ~_delay _ammoType = "Grenade" #Update ? (ariStop == 1) : goto "End" _a = _guns + 1 _a = _a - 1 #Salvo _tempObj = _ammoType camCreate[_cx + Random(_areaX2) - _area,_cy + Random(_areaX2) - _area,50] ~0.01 ~0.4 _a = _a - 1 _tempObj = objNull ? (_a > 0) : goto "Salvo" _rounds = _rounds - _guns ~_freq - (_guns * 0.4) ? (_rounds > 0) : goto "Update" #End exit And this is my Light artilary script... Both use the ["Targetmarker",Spread,Guns,Reloadtime,Ammo,Delay] exec "heavy/light artilary.sqs" INIT. (are you getting any error messages 'n' s**t?) (Edited by MP at 2:46 am on Dec. 9, 2001) Share this post Link to post Share on other sites
MP 0 Posted December 9, 2001 What script was that? (posted 2 artilary script's up here in the past). _Centre = _this select 0 _area = _this select 1 _guns = _this select 2 _freq = _this select 3 _rounds = _this select 4 _delay = _this select 5 _CentrePos = GetMarkerPos _Centre _cx = _CentrePos select 0 _cy = _CentrePos select 1 _areaX2 = _area * 2 ~_delay _ammoType = "Heat120" #Update ? (ariStop == 1) : goto "End" _a = _guns + 1 _a = _a - 1 #Salvo _tempObj = _ammoType camCreate[_cx + Random(_areaX2) - _area,_cy + Random(_areaX2) - _area,50] ~0.01 ~0.4 _a = _a - 1 _tempObj = objNull ? (_a > 0) : goto "Salvo" _rounds = _rounds - _guns ~_freq - (_guns * 0.4) ? (_rounds > 0) : goto "Update" #End exit Now... that's it perfect Ok... That's my heavy artilary script.... _Centre = _this select 0 _area = _this select 1 _guns = _this select 2 _freq = _this select 3 _rounds = _this select 4 _delay = _this select 5 _CentrePos = GetMarkerPos _Centre _cx = _CentrePos select 0 _cy = _CentrePos select 1 _areaX2 = _area * 2 ~_delay _ammoType = "Grenade" #Update ? (ariStop == 1) : goto "End" _a = _guns + 1 _a = _a - 1 #Salvo _tempObj = _ammoType camCreate[_cx + Random(_areaX2) - _area,_cy + Random(_areaX2) - _area,50] ~0.01 ~0.4 _a = _a - 1 _tempObj = objNull ? (_a > 0) : goto "Salvo" _rounds = _rounds - _guns ~_freq - (_guns * 0.4) ? (_rounds > 0) : goto "Update" #End exit And this is my Light artilary script... Both use the ["Targetmarker",Spread,Guns,Reloadtime,Ammo,Delay] exec "heavy/light artilary.sqs" INIT. (are you getting any error messages 'n' s**t?) Share this post Link to post Share on other sites
vitoal125 0 Posted December 9, 2001 i used the light artillery script just like it is there, no errors or anything, but it only shoots one shell. I have 10 guns and 200 ammo, but still only one shot. Share this post Link to post Share on other sites
MP 0 Posted December 9, 2001 d*amn.. it work's fine for me. Just a wild guess but try removeing the " " mark's from goto "End" and goto "Salvo" . This souldent make any difference on how the script run's but it might fix it... OR leave your E-mail and i'll send a samlpe mission. Share this post Link to post Share on other sites
Rob 1 Posted December 9, 2001 MP 2 q. how old r u? and do u know c++? Share this post Link to post Share on other sites
vitoal125 0 Posted December 10, 2001 ok, go ahead and send me a sample mission then because I really need to know how to make loops in scripts for things other than artillery also. email is vitoal125@msn.com Share this post Link to post Share on other sites
MP 0 Posted December 10, 2001 25 and I know it fairly well Problem... My ISP says "it can't send to that RESPhost". Do you have an alternate address? (Edited by MP at 8:01 pm on Dec. 10, 2001) Share this post Link to post Share on other sites
Rob 1 Posted December 10, 2001 like i said in the message... send it to RED for me to see if that works cuz i dont have no other address. if its under 1.50megs then u can try and send it to my school one. ggra01@sjlhs.suffolk.sch.uk Share this post Link to post Share on other sites
MP 0 Posted December 10, 2001 </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Quote: from MP on 7:44 pm on Dec. 10, 2001 25 and I know it fairly well Problem... My ISP says "it can't send to that RESPhost". Do you have an alternate address? (Edited by MP at 8:01 pm on Dec. 10, 2001) <span id='postcolor'> No! This was for vitoal125. (lol) My ISP is very picky about resipient's (?!) Share this post Link to post Share on other sites
vitoal125 0 Posted December 10, 2001 It won't go through to my msn email? thats rather strange. I might still have my yahoo account VitoAL125@yahoo.com Share this post Link to post Share on other sites
Rob 1 Posted December 10, 2001 well if he can't send me my mission to my yahoo address i dont think he can do the same. btw MP i copied ur artillary script and added the line <span style='color:red'>["Targetmarker",Spread,Guns,Reloadtime,Ammo,Delay] exec "heavy artilary.sqs"</span> in a trigger and it wouldn't recognise the comma after the ammo. and do u add a marker? calling it targetmarker? Share this post Link to post Share on other sites
vitoal125 0 Posted December 11, 2001 no need for the sample mission anymore, I found out where the problem was. When I copied it over from the forum, you had left spaces after the commands and I never took them out. After I deleted all the extra spaces, it worked like a charm. Thanx Share this post Link to post Share on other sites
MP 0 Posted December 11, 2001 Yes, example: ["marker1",200,5,10,200,10] exec "heavy artilary.sqs" add a marker to the map called marker1 (or whatever u want). Share this post Link to post Share on other sites
Rob 1 Posted December 11, 2001 wot a d**k .. i just put it in how it was..... SLAP!! SLAP!! Share this post Link to post Share on other sites