Jump to content
Sign in to follow this  
Casto

need some help for my mission

Recommended Posts

#1: I want my ai soldier not to move during a fire fight, no ducking, no walking just fireing.

#2: I want a ai soldier to fire a law rocket on when the command say so (having some probs with that) and not before, for a nice cutscene.

#3: I need a script for a flare to pop up on a specifec time and place.

#4: I need a script for a smoke grenade to pop up on a specifec time and place.

Any help is usefull,

thanx.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Damage Inc @ Jan. 07 2002,18:12)</td></tr><tr><td id="QUOTE">#1 Use the command unitname disableAI "Move".<span id='postcolor'>

ok and then they wont duck anymore and dont walk?confused.gif?

Share this post


Link to post
Share on other sites

totally disables the units ai so he a sitting duck.. you could also try

unitname setbehaviour "careless" so that he does care wether your firing a gun neare his face.

Share this post


Link to post
Share on other sites

#2: Use the following command to prevent firing:

group setCombatMode "mode"

Combat modes: BLUE - never fire; GREEN - hold fire (will defend); WHITE - hold fire, engage at will; YELLOW - fire at will; RED - fire at will, engage at will.

Setting combat mode to green should still let the unit fire when ordered to. Then, order him to fire like this:

unit commandFire target

I guess that doesn't necessarily work unless you've ordered him to acquire target first:

unit commandTarget target

Okay, lets wrap it up. We'll assume that an Object called "soldier" is the firing unit and "target" is the target unit. The whole sequence would then be, without the cutscene camera scripting parts, this:

soldier setCombatMode "GREEN"

soldier commandTarget target

soldier commandFire target

The "commandX" form causes the group's/unit's leader to issue a radio command, a "doX" command is the "silent" way of making soldiers do something. For example, if you don't want the leader to command our soldier to acquire target, you can replace commandTarget with doTarget.

As far as I know, doFire/commandFire work without doTarget/commandTarget if the unit is already in firing position. Also, to use the previously assigned target, you can specify ObjNull as target in doFire/commandFire.

#3 and #4: Shouldn't be too difficult, and I guess there's a few useful script snippets available in http://www.ofpeditingcenter.com.

All of these problems are relatively simple and easily solved by giving it some thought and examining the command reference. I suggest you try solving them yourself, a little scripting exercise won't hurt. In the long run, it's much better than copy-pasteing someone else's solutions.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Rob @ Jan. 07 2002,20:03)</td></tr><tr><td id="QUOTE">totally disables the units ai so he a sitting duck.. you could also try

unitname setbehaviour "careless" so that he does care wether your firing a gun neare his face.<span id='postcolor'>

but i need him to fire back. sad.gif

Share this post


Link to post
Share on other sites

I don't know anything about scripting but I think I can handle that question.

Just stick a unit in the editor where you want him to be and then in his init field set him to stand. I think that will prevent him from laying down and he won't move anywhere if he doesn't have a waypoint. I think anyway.

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  

×