zootia 0 Posted April 22, 2007 I'm working on a map where you can practice bombing targets with the GBUs. So far I had a human do the job, but my clan mates are getting bored of just standing there holding the laser painter up. So, I plan to replace them with a AI recon guy. However, the question arises, How can you make AI laze targets and is it even possible? Should I use waypoints? Help me out fellow mapper! Share this post Link to post Share on other sites
mattxr 9 Posted April 22, 2007 If he can see the target he should do it automaticly. Does for me anyways... Share this post Link to post Share on other sites
Op4 BuhBye 0 Posted April 22, 2007 Make sure the AI can see the target, Put a trigger in the area that will encompasses the AI from where he sits to laze the target and in the "On Activation" field put... AI name DoTarget "name of target";AI name DoFire "Laserdesignator" Group the trigger to the AI and set it to vehicle present. This should work. Share this post Link to post Share on other sites
zootia 0 Posted April 22, 2007 I dunno, if I put in recon DoTarget "tank"; recon DoFire "Laserdesignator" in the space I get an error. "Dotarget type any expected array, object" This is my first time scripting so could you be more specific? and whats vehicle present? Share this post Link to post Share on other sites
zootia 0 Posted April 22, 2007 Okay, I got rid of the "" at the names and it works now. However, the dude just targets it for a second and puts his designator away. How can I have him hold it up? Share this post Link to post Share on other sites
Op4 BuhBye 0 Posted April 23, 2007 copy this to notepad and save it as laze.sqs. You will need to add the unit and taget names to the commands. ~.5 AI name dotarget target1 #loop ~.5 AI name dofire weapon name ?alive target1 : goto "loop" ?!alive target1 : goto "next" #next exit You can add more targets by copying the contense below #loop and changing the target names to the #next section. If you do remove the exit and make a #next1 and put the exit there. If you want 50 targets make a #next51 and add the exit. You will also have to change the #loop to #loop1 etc. In the trigger you made for the AI remove the commands from the on activation and add [AI name] exec "laze.sqs" Put the sqs file in the mission folder. Share this post Link to post Share on other sites
zootia 0 Posted April 23, 2007 Okay, using that script, the dude lazes the target for a second, puts the designator away, pulls it back out, and then lazes it again for a second. * repeat infinitely. Is there no way to keep a prolonged laser painted on the target? Share this post Link to post Share on other sites
CarlGustaffa 4 Posted April 23, 2007 Put it in your missions folder. The one that ends with i.e. .sara Share this post Link to post Share on other sites
maddogx 13 Posted April 23, 2007 You could try using disableAI to take away his "free will". He will still target objects and fire weapons if you give him the doTarget and fire commands. Share this post Link to post Share on other sites
zootia 0 Posted April 23, 2007 how do I "disableAI"? Share this post Link to post Share on other sites
maddogx 13 Posted April 23, 2007 how do I "disableAI"? Put this code before you make him laze something: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">aiSoldierName disableAI "AUTOTARGET" aiSoldierName disableAI "MOVE" I'm pretty sure that should do the trick, but I can't test it myself right now. Share this post Link to post Share on other sites
zootia 0 Posted April 23, 2007 Nope, that didnt work either Is there any way I can take away all his weapons so he only has a laser designator? that way he wont keep changing to his primary Share this post Link to post Share on other sites
doc_no1 0 Posted April 23, 2007 removeallweapons this;this addmagazine "Laserbatteries"; this addweapon "Laserdesignator"; give this to any soldier type. Group the harrier to an officer on ground with ai laser designator guy,always works.3 man team always works for me. Share this post Link to post Share on other sites
zootia 0 Posted April 23, 2007 could you elaborate on that doc? Do I have to use a laze.sqs script or what? specific step by step would be nice. Like I said, I m new to this whole mapping thing but everybody is kinda replying thinking I can follow all this Share this post Link to post Share on other sites
UNN 0 Posted April 23, 2007 If you don't need to see the AI using the designator, you could just create the laser target object, when and where you need it with: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Target="LaserTargetW" CreateVehicle _TargetPos Although you will have to handle the targets yourself with a trigger or script. Share this post Link to post Share on other sites
Dallas 9 Posted April 23, 2007 Just drop an AI recon within view distance of the target. http://www.youtube.com/watch?v=Z7MA_JXXDO8 Share this post Link to post Share on other sites
zootia 0 Posted April 23, 2007 lol dallas. that works. tanks for all you guys that helped out Share this post Link to post Share on other sites
UNN 0 Posted April 23, 2007 Lol zootia, what on earth were you trying to do before that? Share this post Link to post Share on other sites
zootia 0 Posted April 24, 2007 I was messing with scripts and triggers and waypoints Share this post Link to post Share on other sites
Op4 BuhBye 0 Posted April 24, 2007 Thats true, I didnt think of that. Just change the script I put up, to make a lazer dot on the target until its destroyed. Share this post Link to post Share on other sites
Overkill_fin 0 Posted May 8, 2007 I tried to make laser target with <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">laser="LaserTargetW" CreateVehicle getpos target but the laser target disappears 8 seconds after it has been created. Can anyone tell me how to make the laser target to stay until I remove it? Or is this a bug? Share this post Link to post Share on other sites
Evishion 0 Posted May 8, 2007 talking about weapons and scripts.. maybe some OT but.. whats the name for the GBU? made a trigger, where some planes flyed through, with the trigger: this dofire GBU but got error message when they flyed into.. what is the name of the ammo? Share this post Link to post Share on other sites
UNN 0 Posted May 8, 2007 Quote[/b] ]but the laser target disappears 8 seconds after it has been created Yeah sorry, I forgot about that. You have to keep setposing the target above ground. Something like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Pos=GetPos _Target; _Pos Set [2,(_Pos Select 2)+3]; _Laser="LaserTargetW" CreateVehicle _Pos; WaitUntil    {    _Laser SetPos _Pos;    !(Alive _Target);    }; DeleteVehicle _Laser; Quote[/b] ]this dofire GBU  but got error message when they flyed into.. what is the name of the ammo You need to use the fire command instead. Use this line in the vehicles init field, if you don't know what the weapons are called. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Hint Format ["Weapons %1",Weapons This] Share this post Link to post Share on other sites
ArmaVidz 0 Posted May 8, 2007 Has this method been confirmed working UNN? Thanks, ARMAVIDZ Share this post Link to post Share on other sites
CarlGustaffa 4 Posted May 9, 2007 I tried to make laser target with<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">laser="LaserTargetW" CreateVehicle getpos target but the laser target disappears 8 seconds after it has been created. Can anyone tell me how to make the laser target to stay until I remove it? Or is this a bug? http://community.bistudio.com/wiki/Target This is all info I could find about "Target". Where did you come up with this "LaserTargetW" thingy? Are there other types of target objects available? Share this post Link to post Share on other sites