Jump to content
Sign in to follow this  
Mandingo

Prisoners

Recommended Posts

Would someone be kind enough to point me to two scripts.

1) how to make a unit sit down as a prisoner until the Join WP is activated by the rescue team

2) how to stop the enemy AI from killing their prisoner.

Thanks in advance....

Share this post


Link to post
Share on other sites

Don't know for the first question, for the second though "this setCaptive true" would work.

Share this post


Link to post
Share on other sites

1) playMove / switchMove i think

Name playMove "Animation"

Name switchMove "Animation"

animations

AmovPsitMstpSlowWrflDnon (sit down)

AmovPsitMstpSlowWrflDnon_Smoking ( sit and smoking )

Edited by davincy81

Share this post


Link to post
Share on other sites

Mandingo:

removeallweapons unitname ; unitname disableAI "Move" ; unitname setcaptive true ; unitname switchMove "testsurrender"

and on activation (trigger blufor timeout 3|3|3 seconds):

unitname disableAI ""; unitname switchMove ""

Share this post


Link to post
Share on other sites

Hi Icebreak,

I have inserted the script shown, I presume the first one goes into the UNITS INIT Box, and the second goes into a trigger activation box. Dont seem to work though when i enter the trigger with another friendly unit, I also tried to put a Join WP and Join and lead WP sync'd and still nothing. Any ideas?

Share this post


Link to post
Share on other sites

ithink u need only one of both examples to activate the reaction of the "prisoner-unit" !?

(the first one works good in a trigger! )

to let the prisoner join your squad you need another order.

set a new trigger for player only

on activation:

[ Name1] join Name2

edit:

may be first

[ Name1] join grpNull;

and then

[ Name1] join Name2

edit 2: is the prisoner-unit in "prison " at mission start?

Edited by davincy81

Share this post


Link to post
Share on other sites

Hi davincy81,

Sorry i cannot follow you there, my fault i am a NEWB to this and I am struggling still.

You say make another trigger that is activated by player. How do i make a trigger which is activated by player only? also would the below acript be placed in On Act Box or On condition? Would this script look like this?

[Name1] joing grpnull; [Name1] joing Name2

Name1 and Name2 = name I give to my units yes?

Share this post


Link to post
Share on other sites

you can make trigger-activation by one unit the same way you make a group.

F2 and connect both ( trigger and unit ) with the "blue line"

when u open trigger menu next time u can chose :

vehicle, group , leader only...

--

your mission:

first trigger ( for prison unit)

activation:

removeallweapons unitname ; unitname disableAI "Move" ; unitname setcaptive true ; unitname switchMove "testsurrender"

unitname = name you gave the unit

( i think u dont need unitname disableAI "Move" but u ve to try a little bit.

second trigger:

trigger position is near the prisoner

trigger is activated just for YOU (player!? )

activation:

[unitname] join grpNull; [unitname] join Name2; unitname setcaptive false

name2 is your name! or "player"

edit:try this. may be there is a problem because prison unit try to join grpNull and your group at the same time. in this case we will make per .sqs-file i think

edit: may be prison guy wont stop prison animation. in this case try a animation which have an "end" ( heal animation or somthing) before he join your group. let me know if it works

last edit ( for sure ): i tried >> with animation before he join your group works great

Edited by davincy81

Share this post


Link to post
Share on other sites

davincy, that now works great thanks for your support. just one problem the unit will not follow although he is now grouped with me. In fact he wont follow any commands appart from sit. Any ideas how to bring him back into my full command.

Thanks

---------- Post added at 10:45 PM ---------- Previous post was at 10:42 PM ----------

I noticed you said this may happen, can you show me an end script to bring him out of prison mode? Also Pls explaine where I should put this..

thanks again

Share this post


Link to post
Share on other sites

:confused:

hm... he is member of your group but he dont want follow your commands?!

i ve no idea at the moment.

whats his rank and what is your rank?

what is his side and what is your side? ( east , west , cdf ... )

to bring him out of prison mode ( unitname setcaptive true > enemy will not shot em ) is :

unitname setcaptive false

may be its really a problem that all happens at the same time in this line:

[unitname] join grpNull; [unitname] join Name2; unitname setcaptive false

if you have a little time between the commands it could work. but im not sure about waitingtimes in a init-line.

this:

~0.1 (waitingtime in seconds )

will not work i think. but u could try :

Sleep 0.1; between the commands.

im not sure.

may be you should make this in .sqs-file

EDIT:

oh wait,... did u make the heal-animation before he join your group???

Edited by davincy81

Share this post


Link to post
Share on other sites

also using joinSilent over join is good. He will simply join your group and you can have some cool sideChat conversation without the annoying "5, Follow 1" being spoken when a squad member is joined ;)

Share this post


Link to post
Share on other sites

No I did not make the heal animation, I was not sure how to do this...

Share this post


Link to post
Share on other sites

ok try with new animation before he join.

when he have done the animation he will go back to his standart situation.

in your trigger:

unitname switchMove "AinvPknlMstpSlayWrflDnon_healed"; [unitname] join grpNull; [unitname] join Name2; unitname setcaptive false

you can call the "heal" animation > prison-unit remove hobble from feets or something ;)

understand? we letem make a animation to bring him out of the prisoner "animation" ( hands behind head )

doesnt matter what kind of animation... point is a animation which has an "end"

i dont know the code for " unit, stop any animations and go back to standart situation".

thats why i let him switch anim again before he join your group.

Edited by davincy81

Share this post


Link to post
Share on other sites

I wanted to add prisoners to a mission and found this thread via Google search.

I had the same problem that the prisoners didn't follow me after they joined me.

To make them follow you this is a solution:

Add

unitname enableAI "Move"

to the trigger.

I wrote this for anybody who will find this thread and has the same problem...

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  

×