Black² 10 Posted July 22, 2009 (edited) I want to have a chopper move to a new waypoint when a greensmokegrenade is trown. ive searched but I only found long and complicated scripts.. isnt there like a line i could just ''trow'' into the discription? -love these forums :D I got this but it gives me; Type Nothing, expect Bool <-- what does that even mean? me fire ["SmokeShellGreen"]; me is the name of the player.. ye ye.. im not good at coding haha Edited July 22, 2009 by Black² forgot something Share this post Link to post Share on other sites
Tajin 349 Posted July 22, 2009 but I only found long and complicated scripts Well then atleast you have something to start with. There is no simple alround solution for everything, consisting of just 1 line of code. But it shouldn't be that hard either, so just give it a try and put some effort in it. Share this post Link to post Share on other sites
Black² 10 Posted July 22, 2009 Well then atleast you have something to start with.There is no simple alround solution for everything, consisting of just 1 line of code. But it shouldn't be that hard either, so just give it a try and put some effort in it. Ive been working on it 12 hours a day.. for a week long. dont say im not putting effort in it.. all i need is 1 line of code.. somewhere along the line of me fire ''smokegrenadegreen/purple/etc'' please.. i beg you (luls) HALP! Share this post Link to post Share on other sites
frisky 10 Posted July 22, 2009 dont know exactly what you want but i'll try you want to have a chopper move to a new waypoint when a greensmokegrenade is trown. so you have to work with triggers and waypoints create a small trigger at the position where you want the chopper to pick you up that trigger should be activated by de side you play in the condition of the next way point of a chopper you put this extraction == 1 this will make the chopper wait untill extraction = 1 in the trigger you put in the activation field extraction = 1; S1 fire smokegrenadegreen; S1 is a soldier in your group who will throw the green smoke genade you have to name one of the soldiers to S1 you also have to equip S1 with an smokegrenadegreen otherwise he cant fire it Share this post Link to post Share on other sites
Black² 10 Posted July 22, 2009 (edited) I love you. [EDIT] Help this doesnt work D: on the trigger.. what does the condition need to be? Edited July 22, 2009 by Black² Share this post Link to post Share on other sites
Black² 10 Posted July 22, 2009 *bump* sorry but I really need an answer D: Share this post Link to post Share on other sites
JDog 11 Posted July 22, 2009 Ive been working on it 12 hours a day.. for a week long. >.>anyway... assuming I understand how frisky's thing would play out, the condition for the trigger could be one of two things. 1) BLUFOR being detected (or your group/member specifically). In this case the chopper would come just by you entering the trigger area, and the smoke grenade would be purely cosmetic. This would be simplest, but if S1 died it would mess it up. 2) S1 no longer having a green smoke grenade. In this case the chopper would only come when S1 had already thrown green smoke. The code would be somethin like !(S1 hasWeapon "SmokeshellGreen") but idk if hasWeapon will work for that, since adding it is as "addMagazine"; If he ever throws it prematurely (a problem), you could just add it to him upon entering the trigger area, then have him throw it immediately after. Share this post Link to post Share on other sites
Black² 10 Posted July 22, 2009 thanks ill try that! ill report back if it worked and make a lill compilation/tutorial out of this if it works :) Share this post Link to post Share on other sites
JDog 11 Posted July 22, 2009 Ok I got it. For the record hasWeapon doesn't work with magazines/grenades you use "SmokeShellMuzzle" to have him throw it dont know if you can define a variable "extraction" like that in the editor, wont let me anyway So for a quick test to show how it works, you need 1 trigger and 2 waypoints. ______________________________ S1 is AI with a single green smoke grenade (no other smokes, or he might throw the wrong one, if it matters). C1 is the chopper that will extract. Set two waypoint for the chopper. First one where you want it to sit and wait, second where you want it to extract the group. Create a trigger, set to default "None" and "Present". On activation is S1 fire "SmokeShellMuzzle"; . GROUP the trigger to S1. SYNC the trigger to C1's first waypoint. The trigger will activate when S1 enters the trigger area, causing S1 to throw his smoke grenade and causing C1 to continue on to the next waypoint. ______________________________ There ya go. Share this post Link to post Share on other sites
Black² 10 Posted July 22, 2009 this must be retarded for you.. but I dont want my AI buddy to trow it.. S1 should be me :D i want to trow it myself yano D: Share this post Link to post Share on other sites
JDog 11 Posted July 22, 2009 so just throw it yourself and pretend that's why the chopper came lol. usually the answers turn out to be pretty simple but i dont think so in this case. detecting a thrown smoke grenade and forwarding it's location or the thrower's location is beyond me right now. only guesses I have is that you'll end up using a trigger that gives your character a "fired" eventHandler which runs an external script detecting a nade toss, and maybe nearestObject to get a hold of the smoke grenade in the script, so u can get it's coordinates, which u can then do whatever with. dont ask me about any of that tho haha :P Share this post Link to post Share on other sites
rocket 9 Posted July 22, 2009 If you download and unpbo my "Island Twilight" map, you'll see that I have a script to detect when a smoke is thrown, and the C130 drops ammo. Will work fine for waypoint detection also. Its about three lines of code. I'm at work at the moment, so I'll post the code later. Share this post Link to post Share on other sites
Black² 10 Posted July 22, 2009 If you download and unpbo my "Island Twilight" map, you'll see that I have a script to detect when a smoke is thrown, and the C130 drops ammo. Will work fine for waypoint detection also. Its about three lines of code. I'm at work at the moment, so I'll post the code later. Please do post the code haha, for some reason my pc has a hard time openening small Exe's.. :j: Share this post Link to post Share on other sites
rocket 9 Posted July 22, 2009 (edited) ((count ((markerpos "CheckSmoke") nearObjects ["SmokeshellGreen",50])) > 0) That will check if any green smoke has been dropped within 50 meters of a marker called "CheckSmoke". It will return the result true/false - so can be used in a trigger or waypoint Edited July 22, 2009 by Rocket Share this post Link to post Share on other sites
JDog 11 Posted July 23, 2009 very nice, thanks for that input Rocket Share this post Link to post Share on other sites
Snakelet 10 Posted July 23, 2009 Nice, that could come in handy someday soon. Thanks Rocket :) Share this post Link to post Share on other sites
Black² 10 Posted July 23, 2009 (edited) ((count ((markerpos "CheckSmoke") nearObjects ["SmokeshellGreen",50])) > 0) That will check if any green smoke has been dropped within 50 meters of a marker called "CheckSmoke". It will return the result true/false - so can be used in a trigger or waypoint so that goes in the waypoint I created? [edit] IT WORKS <3!!! :D I put this on the ARMAholic forums as well.. ofcourse I credited you :D Edited July 23, 2009 by Black² Share this post Link to post Share on other sites
crazyrobban 10 Posted July 23, 2009 (sorry for butting in.) I'm also looking for something like this, so this is what needs to be done: *Create a marker at the extraction point, call it CheckSmoke *Set a "LOAD" waypoint for the helicopter *Sync the LOAD waypoint with a trigger that has "((count ((markerpos "CheckSmoke") nearObjects ["SmokeshellGreen",50])) > 0)" in the condition area Or am I way off here? Share this post Link to post Share on other sites
Black² 10 Posted July 23, 2009 (sorry for butting in.)I'm also looking for something like this, so this is what needs to be done: *Create a marker at the extraction point, call it CheckSmoke *Set a "LOAD" waypoint for the helicopter *Sync the LOAD waypoint with a trigger that has "((count ((markerpos "CheckSmoke") nearObjects ["SmokeshellGreen",50])) > 0)" in the condition area Or am I way off here? read 2 posts above.. lol Share this post Link to post Share on other sites
crazyrobban 10 Posted July 23, 2009 Sometimes you can't see the forest because of all the trees... sorry :rolleyes: Share this post Link to post Share on other sites
Black² 10 Posted July 23, 2009 Sometimes you can't see the forest because of all the trees... sorry :rolleyes: nicelly said :) Thanks again Rocket! my mission is coming a long nicelly :) Share this post Link to post Share on other sites