Jump to content
Sign in to follow this  
ofp_noob

how do i make a unit crouch/prone

Recommended Posts

well im making a mission and i whant a man to run upto a wall a crouch next to it.i can make him sit down but obvisously he cant shoot anyone

and anyone know how to make a plane start at a specific height

the <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">flyinheight 120

does not work for helis or planes

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this flyInHeight 120

Alternatively, use the Name of the Unit in place of this.

E.g.<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">myHelo flyInHeight 120

Have fun!  biggrin_o.gif

Share this post


Link to post
Share on other sites

Dunno about the man>crouched, but for prone:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">man setUnitPos "Down"

and for the planes:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">plane flyInHeight 1000

works for me. Be careful with too low altitudes though, AI won't manage to fly in very low height without crashing (HiLo profiles)

Share this post


Link to post
Share on other sites

thanks for your help smile_o.gif but i got more,i whant a group to wait for a certain unit to join them,then carry on.

plus another thing i make a group and i tell the leader to goto to a specific waypoint but olny the leader goes.how can i make the whole group

i can make men start in a parachute in the air but it would help if you could also tell me how to make people eject at a certian point out of a plane/helicopter

Share this post


Link to post
Share on other sites

If you are using the doMove or commandMove command... don't. Use the 'Move' command.

Share this post


Link to post
Share on other sites

put this in the waypoint or the units init line

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> this switchMove "Crouch"; this setBehaviour "Stealth"; this setUnitPos "UP"

Share this post


Link to post
Share on other sites

There are parachuting scripts here.

Give the certain unit a join waypoint. Give the group a join and lead waypoint. Synchro the two together.

Share this post


Link to post
Share on other sites

1) make a waypoint for the group, in his condition field write:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">certain_unit in (units your_group)

the group will wait then until certain_unit joined. for this to work you have to define your_group, f.i. in the leader's init line:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">your_group = group this

2) to make the whole group go somewhere, either use a waypoint or use the "move" command. The last one works like a "MOVE" waypoint for the group.

3) say the group has the name your_group (see above), then you can make two possible things. Create a waypoint for the helicopter where your_group has to eject, write in the on_activation field of the waypoint

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x action ["eject",heli]} forEach your_group

(note: heli has to be the name of the helicopter)

This method looks rather bad though, since all of them eject at once. To make the whole thing look better, you can use a second way: write in the waypoint's on_activation:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[your_group,heli] exec "eject.sqs"

Then you need eject.sqs

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_group = units (_this select 0)

_heli = _this select 1

_interval = 1

_i = 0

#eject

(_group select _i) action ["eject", _heli]

unassignVehicle (_group select _i)

_i=_i+1

~_interval

? (_i<(count _group)) : goto "eject"

exit

That way all the units will jump of one after each other in an interval of _interval seconds.

Share this post


Link to post
Share on other sites

What is happening or not happening, exactly?

Let's just eliminate the obvious:

1) You've set your helo to flying?

2) Where are you placing the code this flyInHeight 120? In the INIT field right?

3) If you're using the myHelo flyInHeight 120 method, you did put myHelo in the NAME field?

Share this post


Link to post
Share on other sites

well its ment to be a ww2 airborne drop

i made a c47,named it as plane.then put in the

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">plane flyinheight 120 in the init thing but it still didnt work .

i nkow it uses a trigger but i whant a unit to go somewere and then once hes there enemy troops come

Share this post


Link to post
Share on other sites
i nkow it uses a trigger but i whant a unit to go somewere and then once hes there enemy troops come

You're trying to use a TRIGGER to get your C47 at the desired height. I don't think that will work.

You are putting the code in the Unit's Initialization field, correct? It will workin in the unit's waypoints as well.

And again, the C47 is set to flying correct?

Share this post


Link to post
Share on other sites

ive decied to screw the ww2 idea time for veitnam

but i whant the chopper to goto a lz and hover 4 or 5 meters above ground then once all the men have got out it will go of somewere.

as i said tho i whant to get out of the heli then once were out the enmys will attack

Share this post


Link to post
Share on other sites

Erm...

Hawkins released a mission recently called Dak To and in the mission he had the choppers hovering and the men jumping out, maybe you could have a look at how he did it, I'm sure he'd let you, he's a good guy really  smile_o.gif  tounge_o.gif

Quote[/b] ]this switchMove "Crouch";

Does that work, I swear the command is <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this switchmove "combattocrouch".

sim

Share this post


Link to post
Share on other sites

ahh im dumb. just found a web called ofpec.com!!! all my editing troubles have been answered. my veitnam mission is almost made as i found a napalm scipt and the heli drop of script.

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  

×