Jump to content
Hawk4669

Making a unit surrender

Recommended Posts

Hey all,

Working on a mission where as soon as a team of soldiers enters a certain radius (of a trigger) a specified unit lays down his weapon, and surrenders to the opposing force...thereby ending the mission.

I've searched the board here for topics on "surrender" and "drop weapons" and "capture", but all have turned up nothing.

Anyone able to help?

Thanks much in advance!

Hawk

  • Like 1

Share this post


Link to post
Share on other sites

It can be done by combining a few things.

I dunno to drop the weapons, but you can use the command "removeallweapons" for that.  You don t see him put down his weapons that way.

There is a command to drop weapons, but i don t know if that works on a single soldier ( it works if he s ordered by a superior )

For the surrendering you can use the "playmove" command.  Search for tutorials about playmoves to see what move you can use.  ( i think it s something like "fxstandsur" i am at work so dont have any tutorials here. )

Just combine these things and it ll work.

I ve done something simular in a missions i made, i made an enemy general surrender and come under my command.  He wasn t armed but that s just one more command.

Cheers

/edit :

I forgot most important command => [unitname] setcaptive true

Otherwise Ai will blow him away. Bet you combine the setcaptive with the removeallweapons in one trigger so it happens at the same time.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the help so far Jap.

What I'm looking for now is how to combine these all so that I have a trigger that activates when my forces get within a certain range of the target. Once they have him in custody, they move him to the waiting helo, and the mission ends upon returning to base.

Hope that helps a bit more.....

Thanks again in advance!

Hawk

Share this post


Link to post
Share on other sites

Well you could all do trigger or in a few and time them a little apart to have better effect.

Lets say your "victims" s name is james.

Trigger :

Activated : West

Once

On condition : whatever conditions need to be met

On activation : look below

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">removeallweapons james; james setcaptive true; james playmove "fxstandsur"<span id='postcolor'>

That will make the victim drop all his weapons, set him captive so AI won t attack him and let him put his hands above his head.

You can then put whatever effect or text you like to play in that same trigger.

Now for the joining part.

You can do two things.

Best thing is that you make a waypoint for your squad "join and lead" at the location of the victim and make a waypoint "join" for the victim, sync them both and also sync the "join" waypoint of the victim with the trigger.  So when he surrenders he joins your squad and you can order him around.

Or you can just put a waypointstring for the victim and sync one waypoint with the trigger, he will stop at that waypoint untill the trigger is tripped and will then follow his waypoint string.  You have no control over him that way.

Hope this helped.

Cheers,

You can do it a bit cooler like this, but just experiment and you ll find out for yourself and learned alot more in the process

/edit : make sure the unit you capture does not have a higher rank as your officer !

  • Like 1

Share this post


Link to post
Share on other sites

Here's an example for the radius condition:

Name your squad by using the leader's init field.

mygroup=group this

Name the soldier to be captured let's say: capguy

Now create a trigger with a range x/y 0/0

condition:

"_x distance capguy < 50" count (units mygroup) > 3

:note - this trigger would become active, as soon as 4 units

of squad mygroup are less than 50 meters away from

capguy. If you think it's enough with 30 meters and only

one guy to be close to him, then:

"_x distance capguy < 30" count (units mygroup) > 0

With the activation field of that trigger, you can do what you

want now.

~S~ CD

  • Like 1

Share this post


Link to post
Share on other sites

First off let me say, a huge thanks to you that've been helping me out here. I'm making progress, but still having problems.

The VC commander (it's a Viet Nam mission) named co (for commanding officer) is now surrendering to my guys, and is joining the group.

However, now the problem I'm having is that he won't move! lol He seems to be rooted to the ground and will not follow commands. My character is a Captain....he's a Lieutenant, so I out rank him. I tried having him move, board a chopper, etc.....yet he doesn't want to move.

Any ideas? (oh, and I used Jap's method listed above)

Thanks again guys...very much.

Cheers!

Hawk

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 (Hawk4669 @ Sep. 03 2002,21:40)</td></tr><tr><td id="QUOTE">First off let me say, a huge thanks to you that've been helping me out here.  I'm making progress, but still having problems.

The VC commander (it's a Viet Nam mission) named co (for commanding officer) is now surrendering to my guys, and is joining the group.

However, now the problem I'm having is that he won't move!  lol   He seems to be rooted to the ground and will not follow commands.  My character is a Captain....he's a Lieutenant, so I out rank him.  I tried having him move, board a chopper, etc.....yet he doesn't want to move.

Any ideas?  (oh, and I used Jap's method listed above)

Thanks again guys...very much.

Cheers!

Hawk<span id='postcolor'>

Maybe he s stuck in his "move"

Try the command after the others use ; to put next command

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">co playmove ""<span id='postcolor'>

Maybe that helps

Cheers

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 (Hawk4669 @ Sep. 03 2002,22:15)</td></tr><tr><td id="QUOTE">Where would I place that?  In the trigger?

Thanks,

Hawk<span id='postcolor'>

You can put it in the on activationfield with the other stuff.

after the last command just put

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">; co playmove ""<span id='postcolor'> as it stands there.

That will put him out of his surrendermove and free to follow orders.

you can also try switchmove instead of playmove.

Cheers

Share this post


Link to post
Share on other sites

sad.gif He still just stands there.

It allows me to issue him orders....and he says "roger".....

....but then he waits about 30 seconds and then says "negative."

Hawk

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 (Hawk4669 @ Sep. 03 2002,22:25)</td></tr><tr><td id="QUOTE">sad.gif  He still just stands there.

It allows me to issue him orders....and he says "roger".....

....but then he waits about 30 seconds and then says "negative."

Hawk<span id='postcolor'>

is he inside a building or so ?

He could just be stuck in the scenery or cant plot his route.

Try moving him a bit

Share this post


Link to post
Share on other sites

Actually, he's in the middle of no where in a field currently sad.gif

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 (Hawk4669 @ Sep. 04 2002,04:11)</td></tr><tr><td id="QUOTE">Actually, he's in the middle of no where in a field currently sad.gif<span id='postcolor'>

I will check the mission i made if i didn t forget anything.

That will be tonight though cause i m at work.

If i find anything i ll let you know.

Did you try without the playmove command yet ? Try that see if it works, if it does then the problem is with the animation.

Share this post


Link to post
Share on other sites

Hey so, I didn't still figure it out how to make the unit surrender. Could someone tell me how to make it step by step? I never really made these kind of things but I would actually wanna to try it out, maybe even make some missions.

~Hery387

  • Like 1

Share this post


Link to post
Share on other sites

https://dropmefiles.com/yPZDZ

Try that out. I'm not a mission maker, or scripter. It's using what was posted earlier in the thread. There are some small issues you might have.

Certain animations can only be called with switchmove. The problem with that command, is that it's instantaneous. There's no lead in, or out.

Unfortunately the surrender anims are affected by this. So the movement will appear very sudden and "snappy".

 

  • Like 1

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

×