Jump to content
Sign in to follow this  
Guest

OA Flashlights

Recommended Posts

Guest

Hi guys, I'm making another multiplayer mission and I need all the members in my squad to have flashlights. I can't find the classname so I can't add it into the initfield...

Is there a way to give flashlights to units manually?

Share this post


Link to post
Share on other sites

You need to equip them with weapons that have an attached flashlight.

Guns with Flashlights:

Glock17_EP1

M4A3_CCO_EP1

SCAR_L_CQC_Holo

SCAR_H_CQC_CCO

Guns with Lasers:

Mk_48_DES_EP1

M249_EP1

M249_TWS_EP1

M249_m145_EP1

Sa58V_RCO_EP1

Sa58V_CCO_EP1

SCAR_L_STD_Mk4CQT

SCAR_L_CQC_EGLM_Holo

SCAR_L_STD_HOLO

SCAR_L_CQC_CCO_SD

SCAR_H_STD_EGLM_Spect

SCAR_H_STD_TWS_SD

Sharks with Lasers:

Share this post


Link to post
Share on other sites
Guest

Thank you for the info and I cracked up at this

Sharks with Lasers:
:p

Share this post


Link to post
Share on other sites

You might also need to enable them before they actually work!

For flashlights:-

{_x enableGunLights true} forEach units _group;

For IR Lasers:-

{_x enableIRLasers true} forEach units _group;

Share this post


Link to post
Share on other sites
You might also need to enable them before they actually work!

For flashlights:-

{_x enableGunLights true} forEach units _group;

For IR Lasers:-

{_x enableIRLasers true} forEach units _group;

Where exactly do I put this in order to get the players group to activate the lasers?

Share this post


Link to post
Share on other sites
Where exactly do I put this in order to get the players group to activate the lasers?

This is one way....put whichever one you want in the leader of the groups Inititialization.

For flashlights:-

{_x enableGunLights true} forEach units group this;

For IR Lasers:-

{_x enableIRLasers true} forEach units group this;

If you want both lights and lasers enabled you can use this.....

{_x enableGunLights true;_x enableIRLasers true} forEach units group this;

Actually it can be in any unit of the groups Initialization!

Edited by twirly

Share this post


Link to post
Share on other sites

Thank you for the response. I'll try that now.

I had:

{_x enableIRLasers true} forEach units Sandman;

in a WP of the inserting helo. I'll try the way you suggest.

Thanks again.

Share this post


Link to post
Share on other sites

AI will automatically turn theirs on if you've enableIRLasers and they are in Danger mode.

Players seemingly have to manually turn them on. There is an action for IRLaserOn, but I can't seem to get it working. It expects 2 arguments, the name and... something. I've tried objects, player, primaryweapon player, this, that and the other thing and nothing is turning them on automatically. :)

Share this post


Link to post
Share on other sites
AI will automatically turn theirs on if you've enableIRLasers and they are in Danger mode.

Players seemingly have to manually turn them on. There is an action for IRLaserOn, but I can't seem to get it working. It expects 2 arguments, the name and... something. I've tried objects, player, primaryweapon player, this, that and the other thing and nothing is turning them on automatically. :)

Try pressing the "L" key...that switches on and off the laser for the player. I'm using it as we speak.

Share this post


Link to post
Share on other sites

For some reason I find it unreliable to use the "L" key to turn on and off lasers, it works once but when I turn it off I can't turn it on again, maybe it would work better on the action menu?

Share this post


Link to post
Share on other sites
For some reason I find it unreliable to use the "L" key to turn on and off lasers, it works once but when I turn it off I can't turn it on again, maybe it would work better on the action menu?

Not sure why that's happening to you buddy....flipping them on and off here with no problems using "L".

Trying to find a guy with a bloody flashlight to test....but having trouble....LOL!

Share this post


Link to post
Share on other sites
Try pressing the "L" key...that switches on and off the laser for the player. I'm using it as we speak.

Well sure, but the point was to have them start the game turned on. :) "Start manually" = press L.

Share this post


Link to post
Share on other sites
Thank you for the response. I'll try that now.

I had:

{_x enableIRLasers true} forEach units Sandman;

in a WP of the inserting helo. I'll try the way you suggest.

Thanks again.

That should work fine in your trigger if you just add one little bit more:-

[color="Red"]nul=[/color]{_x enableIRLasers true} forEach units Sandman;

Edited by twirly

Share this post


Link to post
Share on other sites

forEach has no return value, so there's no need for nul=

enableIRLasers does nothing more than allow the group to use IR lasers, saving the player from having to issue the "Enable Lasers" action (~, 6, 2) command for their AI troops. They still have to be in Danger Combat Mode for the lasers to actually be turned on.

Also, a bug apparently just bit me, and half my hand is swollen.. :eek:

Share this post


Link to post
Share on other sites
forEach has no return value, so there's no need for nul=

enableIRLasers does nothing more than allow the group to use IR lasers, saving the player from having to issue the "Enable Lasers" action (~, 6, 2) command for their AI troops. They still have to be in Danger Combat Mode for the lasers to actually be turned on.

Also, a bug apparently just bit me, and half my hand is swollen.. :eek:

Maybe a combatmode/behaviour combination.

Track down and kill that bug. Lasers on boys!

.......There is an action for IRLaserOn, but I can't seem to get it working. It expects 2 arguments, the name and... something. I've tried objects, player, primaryweapon player, this, that and the other thing and nothing is turning them on automatically. :)

Have you tried "true" and "false"?

Edited by twirly

Share this post


Link to post
Share on other sites

Yup: true, false, 1, 0, on, off, player, this, someotherunit, primaryweapon this, "weaponclassname", random characters, swear words.. :) Maybe an array of [this, primaryweapon this]]?

Share this post


Link to post
Share on other sites

kylania,

I can't figure out what that something is either. Hmmmm...

Militantsausage,

I don't have any troubles when I press L. Does it not work and work again when using the same gun? I've had a few problems with certain guns but I think they just didn't have the IR working. Can't remember which one and it was a while back.

It seems the AI like to turn off the lasers when stopped and scanning for a target.

Share this post


Link to post
Share on other sites

I'm having input troubles (i.e. with L) when in combination with setAccTime 2 or 4. It's like the hook doesn't want to play ball while on accelerated speeds. And that 'L' key is more prone to not catching the keypress than anyone else. I think it's the only one with this problem (not a biggie naturally, just an oddity).

Share this post


Link to post
Share on other sites

Why are your players in a situation where they'd have to turn on a laser while moving at 4x the speed of reality? :)

Share this post


Link to post
Share on other sites
Why are your players in a situation where they'd have to turn on a laser while moving at 4x the speed of reality? :)

Drugs can have many "wonderful" effects!!

Share this post


Link to post
Share on other sites
Why are your players in a situation where they'd have to turn on a laser while moving at 4x the speed of reality? :)

Uhm, mission debugging? :p All I'm saying is that it is a bit odd that it's having problems catching that particular key at accelerated speeds. Militantsausage claims it is unreliable for him, so I thought it could be relevant. Who knows, there might be a bug in there somewhere :)

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  

×