Jump to content
Sign in to follow this  
MAsta_KFC

Staying crouched while firing

Recommended Posts

I'm trying to set up a hostage rescue scenario where I have a sniper and spotter on the roof, crouching and ready to fire. I've searched the forums and I've found out how to make the CT's (sorry for using CS terms) start the mission crouching. However the problem starts when I set up a trigger for the sniper to fire on a radio command. As soon as I give the order to fire, the sniper stands up, then fires. This, unfortunately, is a tad unrealistic and far too slow for the mission purpose.

I've tried using the doWatch, doTarget, doFire commands but all of them make him stand before firing. Is it possible to make him fire STRAIGHT AWAY (or close enuff)? That is, to fire while still crouching?

Edit: The current command I am using the CTs to start crouching is:

sniper setbehaviour "combat"; sniper switchmove "crouch"; sniper setunitpos "up"

Share this post


Link to post
Share on other sites

put this into init:

sniper setunitpos "DOWN"; sniper setbehaviour "combat";

This will fix the sniper on the ground.

To make the sniper target someone use this in OnActivation of trigger:

sniper reveal nameoftarget; sniper dotarget nameoftarget; sniper dofire nameoftarget;

Note: "sniper dofire nameoftarget" is often not necessarry cause sniper will engage target on his own if he is told to target the target, but it´s to make sure that it works.

Share this post


Link to post
Share on other sites

Unfortunately the init u gave me makes the sniper go prone, rather than crouch on startup. The only reason why i need him to crouch rather then prone is because the building is too high and if he prones, it will block the sniper's LOS. I need him to stay crouched and fire straight away on trigger.

Share this post


Link to post
Share on other sites

The problem I see is that scripting commands dont cover the midst position so far. So basically you used an animation but not a real position declaration for the sniper. I dont know a working way to fix your problem.

Share this post


Link to post
Share on other sites

Ahh ic. Well, i hope BIS add a setunitpos "mid" command or something like that.

Thanks for the help anyways smile.gif

Share this post


Link to post
Share on other sites

Yes, i did in fact. All the threads I read were inconclusive, they seemed to die when noone found a solution.

Share this post


Link to post
Share on other sites

When you set the unit to "combat" and "up" he will only go down on his knees when he "feel" he has enough view on his surroundings i.e. on a open area with no walls around.

Share this post


Link to post
Share on other sites

I dont think that's the issue. I've seen AI fire in crouched position many times, i just need to find a way of triggering that specifically.

Share this post


Link to post
Share on other sites

I know AI is doing it and I wanted to use that also but there is still no scripting command for it.

Share this post


Link to post
Share on other sites

hey u could try putting a waypoint and sniper setbehaviour "combat"; sniper switchmove "crouch"; sniper setunitpos "up" then cycle it! the sniper will stay crouched and take out the enemy but i dont know about getting him to not fire untiled commanded to?!

Share this post


Link to post
Share on other sites

Is there a way to make the a.i. crouch in v1.46 too? Or do I have to install resistance again? sad.gif

Share this post


Link to post
Share on other sites

you'll have to pardon my lack of scripting kills but if there are 3 postures the soldier can take, but only 2 have released commands (stand, ly down) isnt there a way to use the 3rd using logic?

if you want some1 to crouch couldnt you just go:

sniper dont stand; sniper dont ly down,

not coded like that of course, but i hope u know what i mean. not allowing the unit to stand or go prone would only enable it to crouch?

just a thought.

Share this post


Link to post
Share on other sites

How do you stop a unit 'going prone' when firing?

I've got an 'outro-loose' set up in my mission where you see the player getting shot by a firing squad. But when the instruction to fire comes they all get down on the ground like idiots. I tried using the unitname setunitpos "up" command but then the units don't shoot.

I've not scripted this, although I could. I'm just using triggers set to true and each one has a wait time before triggering.

The firing squad is made up of East soldiers and the player is a West soldier (setcaptive true), when I want the East soldiers to fire I have a trigger set to switch the captive state of the player to false.

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  

×