Jump to content
weaponsfree

AI Lasers without Combat Behavior

Recommended Posts

I'm trying to get some AI to walk from point A to point B with lasers on, but NOT in combat mode. As far as I can tell, AI will only use lasers if :

 

a )  Their group has enableIRLasers to true

group enableIRLasers true

b ) Are in Combat mode.

The issue is, that I want them walking calmly, in formation, and straight through. In combat they run around, take cover, go prone etc.

I've thought to switch setunitpos to UP until they make contact, and setting it back to AUTO, but this does not keep them in formation and they still jog from cover to cover.

 

Any ideas?

Share this post


Link to post
Share on other sites

this enableGunLights "forceon";

 

Thanks but I had tried that. But it doesn't answer my needs cause you really do have to be in Combat mode, and all the problems mentioned above remain. (plus I think gunlights only works with flashlights).

I'm actually almost there. I was able to have walking, no cover, combat mode, laser on movement with :

{_x setunitpos "up"; _x disableAI "cover"; _x forcewalk true} forEach units sqd2

Now reactivating their normal combat behavior is just reversing the script 

{_x setunitpos "auto"; _x enableAI "cover"; _x forcewalk false} forEach units sqd2

But I'm having trouble setting up the trigger for reactivation. I want the group to reactivate when it spots any BLUFOR. But the knowsabout command seems to only allow sides to knowabout units/groups. Not unit/groups knowing about sides. I'm an utter noob at scripting, so not sure if there is an easy way to "reverse" the knowsabout script. Looking into that now.

Share this post


Link to post
Share on other sites

Have you tried

EAST knowsAbout (side player);
at all? I'm unable to test at this time, but you could quickly plug this in if you have not already and see what happens. This is obviously assuming the player is on the BLUFOR/WEST side; if that's not the case then you'll need to adjust accordingly.

Share this post


Link to post
Share on other sites

Have you tried

EAST knowsAbout (side player);
at all? I'm unable to test at this time, but you could quickly plug this in if you have not already and see what happens. This is obviously assuming the player is on the BLUFOR/WEST side; if that's not the case then you'll need to adjust accordingly.

 

 

I tried it, I get : Knowsabout : Type side, expected Object.

And in my case, I'm trying to know when a specific EAST group knows about WEST, or alternatively knows about the player and his squad.

 

I want this so I can deactivate those commands on an each group individually as they encounter WEST or the player.

Share this post


Link to post
Share on other sites

Why would they be wasting batteries strolling around with their lasers on?

Share this post


Link to post
Share on other sites

Why would they be wasting batteries strolling around with their lasers on?

 

Because reasons.

Or more specifically because it looks cool in the Tanoan Jungle

Or more more specifically because the mission would be too hard without enemy giving away their positions with lasers. It's a tradeoff for the sake of fun.

Or more more more specifically because I am now obsessed with finding a solution.

 

Share this post


Link to post
Share on other sites

Sorry my suggestion didn't work and for wasting your time. Normally I'd test before posting, but I don't have access to Arma today.

Share this post


Link to post
Share on other sites

Sorry my suggestion didn't work and for wasting your time. Normally I'd test before posting, but I don't have access to Arma today.

No worries. My mission is stuck at the moment and my brain is fried. So I'm going to do a generic Detected by Opfor trigger that will switch all patrols back to normal until I can figure out a way to trigger them individually. (probably start a new thread since this one was about lasers and that issue is OK for me now). Thanks for the post.

Share this post


Link to post
Share on other sites

I ended up exchanging lasers for flashlights then using forceon. Not quite as cool but found it difficult to get lasers to work. 

Share this post


Link to post
Share on other sites
On 7/23/2016 at 9:41 PM, Incontinentia said:

I ended up exchanging lasers for flashlights then using forceon. Not quite as cool but found it difficult to get lasers to work. 

how force laseer on ????

help

Share this post


Link to post
Share on other sites

No way for that.

You can try:

onEachFrame { {_x action ["IRLaserOn", _x] } forEach units yourGroupHere };

with a very poor result from time to time, when framed display is in accordance with the laser beam.

Share this post


Link to post
Share on other sites

What's currently working as of 1.85 devbranch:

group this enableIRLasers true;//will activate IR lasers if unit has IR lasers on rifle and enters combat behavior
group this setBehaviour "COMBAT";//enters combat mode immediately

Should result in the group enabling IR lasers.

Only works when group is in combat behavior, no other behavior allows this...

 

As to the suggestion from @pierremgi, unfortunately this isn't reliable at all.

Last time I checked this the lasers will turn off after some time, no matter if using onEachFrame or EachFrame EH.

 

It's still odd that so much stuff (script commands etc.) are tied to AI behavior/combat modes...

Such a weird decision to make AI behavior override script commands.

Mind boggling.

 

Cheers

Share this post


Link to post
Share on other sites

I know this is late, but I know the effect you're looking for and I use it as well. It looks awesome. 

There is no known work around to make them walk normally with lasers on, but what you can do is make them do a cutscene animation like:

unit switchMove "ActsPercMstpSlowWrflDnon_sceneLopotevBandCaptured_Cooper"; 

 

Disable your units 'move' and 'target' abilities. Put them in combat mode and enableIR lasers. When the animation is triggered, he will now walk around searching your jungle with lasers on for like 30 seconds. If you finesse it enough, as I do, you can combine many animations to make a whole squad. Say, once you cross a certain trigger area, a whole squad fans out looking for you. The problem now, of course, is that you can't shoot at them. In fact, this is purely aesthetic, the units aren't even part of the game. So I use this stuff more as an intro. You have to build a whole scene brick by brick. 

But, you can work around that as well. You can force them to fire from an animation and create a whole scene if you'd like. Or, you can really get surgical with it and pinpoint their exact locations within the animation. So, once he reaches a tree or something, you setPos an identical unit with the same gear, hideObject the animated one, and boom, visibly it's the same guy, physically he's now in the game with IR lasers on. I use this method to weave together intros with real scenarios into seamless action. I have many missions with whole squads clearing out entire villages and buildings room by room by carefully weaving together animations and 'sleep' firing at specific times. It takes a lot of work, but if you're that interested in creating a reeeally awesome dramatic set up, it's possible with enough finesse. 

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

×