Jump to content
Sign in to follow this  
Tom_Pynchon

Script for laser sights?

Recommended Posts

Hi.

I'm sure it's here somewhere but I cannot seem to find it.

Is there a script I can use to have an entire team turn on/off the laser sights on their weapons?

I'm new to the ARMA series of games and would really appreciate some help.

Thanks.

Share this post


Link to post
Share on other sites
Hi.

I'm sure it's here somewhere but I cannot seem to find it.

Is there a script I can use to have an entire team turn on/off the laser sights on their weapons?

I'm new to the ARMA series of games and would really appreciate some help.

Thanks.

http://community.bistudio.com/wiki/enableIRLasers

Share this post


Link to post
Share on other sites

Thanks. Quick and simple!

EDIT: I spoke too soon. I followed the link, which gave me this : (units group player) enable IRLasers true. It didn't work. The mission editor returned a "Missing ;" prompt. I dunno what I did wrong.

Anyways, just to clarify. I'd like to have the AIs on my team turn on their laser sights at a certain point in a night-time mission I'm trying to make. I've been searching the forums and have googled the query but cannot seem to find the answer anywhere. The above script looks good, but somehow I couldn't make it work. I tried using it both in the init field of an AI unit and on the On Act field of a waypoint and trigger to no avail.

Will really be grateful if someone can point me in the right direction. I've been working on this mission going on five nights now and am really keen on finishing it well. Wouldn't be the same without those lasers. I'm using ARMA2 OA with the latest 1.59RC patch, no special addons or mods.

Thanks.

Edited by Tom_Pynchon
add paragraphs

Share this post


Link to post
Share on other sites

(units (group player)) enableIRLasers true

There aren't any spaces in Arma scripting commands. Also make sure that the soldiers have weapons with lasers on them, most

don't even though you can see the laser emitter on the front of the gun.

Share this post


Link to post
Share on other sites
(units (group player)) enableIRLasers true

There aren't any spaces in Arma scripting commands. Also make sure that the soldiers have weapons with lasers on them, most

don't even though you can see the laser emitter on the front of the gun.

Thank you. Yes, I hadn't noticed the unnecessary space. That was the problem. My bad.

Sorry for the late reply.

Again, thanks.

Share this post


Link to post
Share on other sites

I don't understand it - what should I write here: (units(group player))??

What If I simple write enable IRLasers true for west in a trigger?

Edited by Gerwazy

Share this post


Link to post
Share on other sites

If you look at the syntax for enableIRLasers, you'll see that it takes Object or Group as parameter, not side.

You could do a forEach loop over all groups on a side. Untested, but something like:

{if (side _x == west) then {_x enableIRLasers true}} forEach allGroups

Ehh, that looks a bit weird, but I'm a bit too tired to spot problems right now...

Edited by CarlGustaffa

Share this post


Link to post
Share on other sites

so I write (units (group player)) enableIRLasers true in a trigger and a group with player turn on their IR Lasers?

Share this post


Link to post
Share on other sites

I'm not sure, why you need a script for this. If you're the groupleader, just give em an order, to enable their lasers?

Edit: Sry, haven't read the 3rd post

Edited by Noricum
Reminder to myself: Read all posts before posting!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×