Tangy 10 Posted July 31, 2010 You've got something wrong somewhere than, can you host your mission somewhere so we can download it? After testing it out some more, it seems my mistake was adding the addaction in the init.sqf rather than a unit's init. Still haven't tested this out on a ded server to see just how mp-compatible it is right now (predicting the laser target won't work, or it spawns a hellfire for each player present). Shouldn't be a problem sorting that out though. Share this post Link to post Share on other sites
r.flagg 11 Posted August 30, 2010 Thanks for sharing so many scripts kylania. I have bookmarked the web site in your sig. A friend and I were trying out your laser missile script last night, and we were able to call in a missile strike. Very satisfying. But we did have a few issues. I used the addaction method, and applied it to the character he was playing. I was 'team leader', but he was hosting mission on a listen server. We use norrin's revive, and my friend said that after respawning, he no longer had the addaction option to call in the laser strike. Also, when he (originally- first time) spawns, he has the addaction words "Fire Missile" appearing right in the middle of his screen. He can easily and quickly get rid of it, by scrolling through his action menu, but still... fyi. In addition to that.. even though his player is the one with the addaction in his init line, when I get close to him, the "Fire Missile" message appears in the middle of my screen as well. Share this post Link to post Share on other sites
kylania 568 Posted August 30, 2010 Yeah, if you're using revive, where you actually die you'll need to reapply the addAction after respawn. Norrin's has an option where you can do that via script towards the bottom of the values area. To not display the action add it like this: _actionId = this addAction["Fire Missile","launchMissile.sqf",[this, missilestart,"M_Hellfire_AT",200], 1, false, true, "", "_caller == _target"]; Not entirely sure about the _caller == _target thing though, but that should limit it to only showing up for the person it's assigned to. The false in that line should make it not display in the middle of your screen. Share this post Link to post Share on other sites
r.flagg 11 Posted August 30, 2010 (edited) Thanks! Trying it in the editor though, and now it says "Script not found" when I preview mission. I'll mess with things on my end see if I can't find an extra space or missing quotation mark or something. Pretty sure I haven't changed anything though, other than the addaction line you just gave me. EDIT: My apologies, I was wrong. The "Script not found" business was apparantly due to me not editing the Revive file correctly. So I removed those lines for now. Will try to figure that out later. However, if I copy/paste your line just as it is, the guy no longer has the fire missile addaction available to him. So I removed the "_caller == _target" part, and now it's back. Still testing. Thanks again for your generosity, sorry for replying too quickly with an erroneous report. Edited August 30, 2010 by R.Flagg I was wrong Share this post Link to post Share on other sites
r.flagg 11 Posted September 3, 2010 Sorry about double posting, but I'm still scratching my head on this one. Re kylania, or whomever might be in the know; 1) Is it possible, when using trigger style of kylania's guided missile script, to limit it to only one player? Currently only my Forward Air Controller can actually target the missile, as he's the only one carrying the laser marker, but I can still see the radio options and try to call, I just get the 'no target found' reply. 2) If using that same missile script in the addaction option, ... does anyone know how to add an addaction to the user_code section of revive_init.sqf? After getting some help, I see now how to use that section to add an sqf script after being revived or respawned, but I still can't figure out how to add an addaction. For example, ... this seems to work; "nul = [player] exec 'legheal.sqs'; (for the legheal script by Celery) but you can't do the same with launchMissile.sqf, because it tries to just fire the missile, and of course there's no target yet, since you're just in the process of standing up after getting revived.. and not ready with your laser, and so on. Share this post Link to post Share on other sites
kylania 568 Posted September 3, 2010 You'd create a new script that would run both legheal.sqs and that adds back the addAction. "nul = [player] execVM 'afterRespawn.sqf'"; afterRespawn.sqf: nul = [player] exec 'legheal.sqs'; if (player == whateverUnit) then { _actionId = player addAction["Fire Missile","launchMissile.sqf",[this, missilestart,"M_Hellfire_AT",200], 1, false, true, "", "_caller == _target"]; }; Just change whateverUnit to whatever unit should get it. Share this post Link to post Share on other sites
Decerto 10 Posted September 3, 2010 @ Kylania: Sometime during your example mission when I call in the missile it comes up with an error saying "cannot open object ca\air3\su34\ch29fly.p3d I'm guessing it's because I just have OA and not Arma 2 and I'm missing some object from Arma 2. I click ok and the missile hits fine. Share this post Link to post Share on other sites
r.flagg 11 Posted September 4, 2010 kylania - That's very clever. Ran a quick test and it seems to be working just fine. Will be playing more later tonight. Anyway, just wanted to say thanks again for being so helpful. Guys like yourself, and norrin, and so many others who share their time and skill with the forums really help to make this game stand out. :) Share this post Link to post Share on other sites
CaptainBravo 0 Posted September 7, 2010 Great script! How do you limit the number of missiles available to you? Share this post Link to post Share on other sites
kylania 568 Posted September 7, 2010 This thread has the version of this which limits the amount available. Share this post Link to post Share on other sites
CaptainBravo 0 Posted September 7, 2010 Thanks Kylania, that is what I was looking for. Share this post Link to post Share on other sites