Jump to content
Sign in to follow this  
Khalashnikovf

How to stop helicopter on ground and wait for GetIn group

Recommended Posts

I've got this little problem.

Im trying to force helicopter on the land, while its waiting on group.

I dont know how to force that chopper and then I dont know how to check who can GetIn that chopper.

I know order unit in vehicle, but I dont know how to use it for a whole group, where can be some units dead and I dont want to write condition for every single possibility which can make happen in case of someones death.

Can anyone pls help?

EDIT: Yes, and How can I turn off the light for unit which is set on CARELESS?

hawk Action ["LIGHTOFF", hawk];

Doesnt work at all :(

Edited by Khalashnikovf

Share this post


Link to post
Share on other sites

Try using the waituntil command:

waitUntil{!(player in HeloTransport)};//player not in heli

waitUntil{player in HeloTransport};//player in heli

Looks like you are using the action command wrong, should be:

unit action ["lightOff", targetVehicle]

Share this post


Link to post
Share on other sites
Try using the waituntil command:

waitUntil{!(player in HeloTransport)};//player not in heli

waitUntil{player in HeloTransport};//player in heli

But I need to get all members of unit into that helicopter,no matter if Player get in like last one.

Thats is my problem.

I made something like this, but its horrible,totally horrible:

S1 = !(sniper in hawk);

S2 = !(spotter in hawk);

S3 = !(shooter in hawk);

S4 = !(healer in hawk);

T1 = !(target in hawk);

S1N = alive sniper;

S2N = alive spotter;

S3N = alive shooter;

S4N = alive healer;

T1N = alive target;

waitUntil {!((((S1) and (S2) and (S3) and (S4))or

((S1N) and (S2) and (S3) and (S4))or

((S1) and (S2N) and (S3) and (S4))or

((S1) and (S2) and (S3N) and (S4))or

((S1N) and (S2) and (S3) and (S4N))or

((S1N) and (S2N) and (S3) and (S4))or

((S1) and (S2N) and (S3N) and (S4))or

((S1) and (S2) and (S3N) and (S4N))or

((S1N) and (S2) and (S3) and (S4N))or

((S1N) and (S2) and (S3N) and (S4))or

((S1) and (S2N) and (S3) and (S4N))or

((S1N) and (S2N) and (S3N) and (S4))or

((SN1) and (S2N) and (S3) and (S4N))or

((S1N) and (S2) and (S3N) and (S4N))or

((S1) and (S2N) and (S3N) and (S4N))or

((S1N) and (S2N) and (S3N) and (S4N)))and!((T1)or(T1N)))};

Just Horrible...

and that light ... that unit word is Unit like some Name of Soldier or Unit like unit?

---------- Post added at 18:07 ---------- Previous post was at 17:45 ----------

I might be thinking that something liek this should work, but it doesnt,because I have no idea how to write it right.

waitUntil {units group sniper in hawk};
Edited by Khalashnikovf

Share this post


Link to post
Share on other sites
{alive _x && _x in hawk} count units sniper == {alive _x} count units sniper

Share this post


Link to post
Share on other sites
{alive _x && _x in hawk} count units sniper == {alive _x} count units sniper

What should this exactly do and where should I put it? :D

Looks really nice,but,you know ... Im still newbie in this stuff

Share this post


Link to post
Share on other sites

That would be the condition of a trigger that's synched to a hold waypoint for the helo or perhaps in a waitUnitl within whatever script you have running.

I have a few examples of this on my page, like my plannedExtraction example.

Share this post


Link to post
Share on other sites

Im lost,and it doesnt work at all :(

while { (!{_x in hawk} count units group sniper == count units group sniper)

} do

{

result = [] call MyPathHawkStayFlee;

};

so this should call unitPlay script for so long when all units are in hawk, but its not wirking ... that unit play script is only one frame called still again and again (The best for me how to stop helicopter on one place after landing chopper on ground ...

which Im controling like this:

waitUntil { hawk distance pointFlee < 3.4 };

sleep 0.5;

:D Im too bad, but its the only way how I know how to do it ... that your script is really nice, but too complex for me begginer :)

Share this post


Link to post
Share on other sites

Looks like you are using the command incorrectly, try:

while { {_x in hawk} count units sniper == 0
} do
{
result = [] call MyPathHawkStayFlee;
};  

This is saying while your group is not in hawk do your script.

Edited by cobra4v320

Share this post


Link to post
Share on other sites

So this thing actually counting number of units outside, because once they getin hawk, they are part of the hawk,is that correct? so its waiting once it gets number zero :)

Correct? Gogint to try this one, looks pretty good.

---------- Post added at 10:20 ---------- Previous post was at 08:39 ----------

Looks like you are using the command incorrectly, try:

while { {_x in hawk} count units sniper == 0
} do
{
result = [] call MyPathHawkStayFlee;
};  

This is saying while your group is not in hawk do your script.

So, I tried this, it has one BUT. if sniper dies, there is no ending for script beause of units group sniper become not exist anymore :(

I will try to make there something like this

while {(
({_x in hawk} count units group sniper == 0)or
({_x in hawk} count units group spotter == 0)or
({_x in hawk} count units group shooter == 0)or
({_x in hawk} count units group healer == 0))
} do

This should do that stuff, but still complicated. Why is that command units group sniper not set for other unit after his death?

EDIT:

Yes,its still doesnt do that stuff, because I have some hint after this cycle and after one of the unit getin hawk, it will skip the cycle...

ANOTHER EDIT: Ok,I made this and its actually working :D

QUnit = 4;
while { !(({_x in hawk} count units group sniper == QUnit)or
({_x in hawk} count units group spotter == QUnit)or
({_x in hawk} count units group shooter == QUnit)or
({_x in hawk} count units group healer == QUnit)) } do
{
QUnit = 4;
if (!(alive sniper)) then  {QUnit=QUnit-1};
if (!(alive spotter)) then  {QUnit=QUnit-1};
if (!(alive shooter)) then  {QUnit=QUnit-1};
if (!(alive healer)) then  {QUnit=QUnit-1};
result = [] call MyPathHawkStayFlee;
};

And it works!!! But still ... I dont like it,Im sure that there is some much easier way ho to that :(

Edited by Khalashnikovf

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  

×