Jump to content
Sign in to follow this  
evans d [16aa]

Help with Rescuing Captives

Recommended Posts

Ok guys,

My MP mission involves some soldiers finding some captive civilians, who are bound and beaten (via the tied up animations from Harvest Red). I have a trigger that plays a script that makes the civvies do the animations but I then want to be able to interupt the animation and "untie" them. I'm new to the whole addAction thing but that's what I want to use.

Idealy, the action will trigger a script that will delete the trigger giving the animation and then reset the civilians so they are standing up again.

This is my script for the animation:

civ1 disableAI "Move";
civ2 disableAI "Move";
civ3 disableAI "Move";
civ4 disableAI "Move";
civ5 disableAI "Move";



civ1 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Sykes";

civ2 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Ohara";

civ3 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Cooper";

civ4 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Rodriguez";

civ5 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Sykes";

sleep 130;

civ1 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Sykes";

civ2 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Ohara";

civ3 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Cooper";

civ4 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Rodriguez";

civ5 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Sykes";

sleep 130;

etc, etc

And the action script is:

deleteVehicle captives;

civ1 playMove "";

civ2 playMove "";

civ3 playMove "";

civ4 playMove "";

civ5 playMove "";

The trigger for the animation is called "captives" and the script is called "civilian". The action script is called "untie".

Also, it would be great if the action was only available to the player who was close enough to activate it. So if a player was 1 meter away then he'd get the action, but the units on the other side of the island don't.

Thanks guys!

Bashkire.

Share this post


Link to post
Share on other sites

I would make a conditioned loop instead. Don't mind the syntax, I'm not that good :)

#isCaptiveLoop

if (MyVar==true) then goto "isCaptiveLoop" else "setfree"

civ1 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Sykes";

civ2 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Ohara";

civ3 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Cooper";

civ4 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Rodriguez";

civ5 switchMove "ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Sykes";

sleep 130;

goto isCaptiveLoop

#setfree

civ1 switchMove "standingAnimPose-Look-it-up-plz";

civ2 switchMove "standingAnimPose-Look-it-up-plz";

civ3 switchMove "standingAnimPose-Look-it-up-plz";

civ4 switchMove "standingAnimPose-Look-it-up-plz";

civ5 switchMove "standingAnimPose-Look-it-up-plz";

exit;

Then make an action or just a trigger at the captives which sets MyVar=false

That's how I'd go about it.

Share this post


Link to post
Share on other sites

I can edit this... I hope. But how? They've got to be tied up and the action is just meant to make it so that the animation stops and the trigger is deleted.

Share this post


Link to post
Share on other sites

switchMove "" and deleteVehicle triggerName should be all you need if that's all you're doing.

Share this post


Link to post
Share on other sites

So in the script I put what I orriginaly posted or I put that in the addAction line?

this addAction ["Untie","untie.sqf",[civs],1,false,true,"","(_target distance _this) < 2"];

or would it be better if I was to do it in the line of code?

this addAction ["Untie","civ1 switchMove ""; deleteVehicle "captives";",[civs],1,false,true,"","(_target distance _this) < 2"];

It should be noted that I've tried making 5 seperate scripts called untieCiv1.sqf through to untieCiv5.sqf and I've been doing it this way

this addAction ["Unite","untieCiv1.sqf",civ1,1,false,true,"","(_target distance _this) < 2"];

this addAction ["Unite","untieCiv2.sqf",civ2,1,false,true,"","(_target distance _this) < 2"];

this addAction ["Unite","untieCiv3.sqf",civ3,1,false,true,"","(_target distance _this) < 2"];

etc, etc...

I bow to your coding knowlage so I'll go with whatever you think it best.

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  

×