Jump to content
Petersang

AI's are dying after a Paradrop

Recommended Posts

Helo guys, 

 

I'm having an issue in some mission im trying to make. I have a simple paradrop of AI's in a specific area, until that point everything is working just fine. My problem is they got ejected of the plane and when they reach the ground they are dying. The parachutes are opening but they still dying when touching the ground.  

My general idea is paradrop them, and when they reach the ground they can be killed by players.

 

My question is any help you can give me ? 😄 Any code/script i could use to make this work ? 

 

Thanks in advance ... 

  • Like 1

Share this post


Link to post
Share on other sites

Hello there Petersang and welcome to Bis Forums !

 

So which is the script that you are using ?

  • Thanks 1

Share this post


Link to post
Share on other sites
41 minutes ago, GEORGE FLOROS GR said:

Hello there Petersang and welcome to Bis Forums !

 

So which is the script that you are using ?

For the paradrop none - I used unitCapture to make the route of the plane and used a trigger for starting when i wish to. The paradrop i made it with a trigger too, i named every paratrooper with a variable and I have a trigger where i want them droped with a simple code for ejecting them all. And that is all working as I want, the problem is really the landing xD They are dying when reach the floor.

 

If needed i can post the codes that i'm using.

 

Thanks for trying to help and for the welcome 😉

  • Thanks 1

Share this post


Link to post
Share on other sites
7 minutes ago, Petersang said:

If needed i can post the codes that i'm using.

 

You should definitely post the code.

The most of the time they die in paradrop hiting each other so it needs to add a little bit of sleep to the code and also use disableCollisionWith vehicle , if there is still a problem ( if i remember right )

https://community.bistudio.com/wiki/disableCollisionWith

Share this post


Link to post
Share on other sites

You can also use the allowdamage false;

but then you will not be able to kill them while airborn.

Share this post


Link to post
Share on other sites
1 minute ago, GEORGE FLOROS GR said:

 

You should definitely post the code.

The most of the time they die in paradrop hiting each other so it needs to add a little bit of sleep to the code and also use disableCollisionWith vehicle , if there is still a problem ( if i remember right )

https://community.bistudio.com/wiki/disableCollisionWith

Later ill post all the code i have to the process of the paradrop, i'm 100% sure that they only die when they put boots on the ground. They are not hitting each other in the air 😄

 

Later today i'll post all the thing i have 😉 short on time right now...

Share this post


Link to post
Share on other sites

@GEORGE FLOROS GR There it is, sorry for the time... 

 

The plane path was done by recording it with Unit Capture and i have a simple trigger to make it start - When a civilian enters the trigger area.

 

So when it's done the plane take off and fligh to the drop zone where i have a trigger activated by ownership of the plane's pilot. That trigger make the guys get ejected of the plane with this on activation:

 

p1 action ["EJECT", train1]; 
p2 action ["EJECT", train1]; 
p3 action ["EJECT", train1]; 
p4 action ["EJECT", train1]; 
p5 action ["EJECT", train1]; 
p6 action ["EJECT", train1]; 
p7 action ["EJECT", train1]; 
p8 action ["EJECT", train1]; 
p9 action ["EJECT", train1]; 
p10 action ["EJECT", train1]; 
p11 action ["EJECT", train1]; 
p12 action ["EJECT", train1]; 
p13 action ["EJECT", train1]; 
p14 action ["EJECT", train1]; 
p15 action ["EJECT", train1]; 
p16 action ["EJECT", train1]; 
p17 action ["EJECT", train1]; 
p18 action ["EJECT", train1]; 
p19 action ["EJECT", train1]; 
p20 action ["EJECT", train1]; 
p21 action ["EJECT", train1]; 
p22 action ["EJECT", train1]; 
p23 action ["EJECT", train1]; 
p24 action ["EJECT", train1]; 
p25 action ["EJECT", train1]; 
p26 action ["EJECT", train1]; 
p27 action ["EJECT", train1]; 
p28 action ["EJECT", train1]; 
p29 action ["EJECT", train1];

 

train1 is the variable of the plane.

The p's are the variable names of each one of the paratroopers, and everything is working ok they get ejected open the parachutes without colliding with each other. Then comes the thing that i am trying to solve when they touch with boots on the ground 60% of them die 😕 

 

Share this post


Link to post
Share on other sites

First of all ,

add below the code and the name of the group to _Group

{	
unassignvehicle _x;
_x action ["Eject", vehicle _x];
}foreach units _Group;

just a question , might be caused from the air velocity ?

can you check it without air ?

  • Thanks 1

Share this post


Link to post
Share on other sites

check first this :

(not tested)

{
  unassignVehicle _x
  _x action ["Eject", vehicle _x];
}foreach assignedCargo (vehicle this);

 

  • Thanks 1

Share this post


Link to post
Share on other sites

fn_jump = {params ["_unit"]; _unit allowDamage false; _unit action ["eject",train1]; waitUntil {uiSleep 2; !isNull objectParent _unit}; _unit allowDamage true};
  { _x  spawn fn_Jump; nil} count assignedCargo train1;

 

The day you have some players among paratroopers...

  { [_x,fn_Jump] remoteExec ["spawn",_x];nil} count assignedCargo train1;

 

Trigger is server only.

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
16 hours ago, pierremgi said:

fn_jump = {params ["_unit"]; _unit allowDamage false; _unit action ["eject",train1]; waitUntil {uiSleep 2; !isNull objectParent _unit}; _unit allowDamage true};
  { _x  spawn fn_Jump; nil} count assignedCargo train1;

 

The day you have some players among paratroopers...

  { [_x,fn_Jump] remoteExec ["spawn",_x];nil} count assignedCargo train1;

 

Trigger is server only.

 

 

Should I change something or only put that on activstion of the trigger ?

 

Thanks for helping me 😉

Share this post


Link to post
Share on other sites

Sorry but i'm very new to Arma 3 coding and scripting, I put - fn_jump = {params ["_unit"]; _unit allowDamage false; _unit action ["eject",train1]; waitUntil {uiSleep 2; !isNull objectParent _unit}; _unit allowDamage true}; - on trigger act and nothing happened.

 

What am I doing wrong ?

Share this post


Link to post
Share on other sites

You just miss the last line:

  { _x  spawn fn_Jump; nil} count assignedCargo train1;

  • Thanks 1

Share this post


Link to post
Share on other sites
1 minute ago, pierremgi said:

You just miss the last line:

  { _x  spawn fn_Jump; nil} count assignedCargo train1;

 

If i put it all - fn_jump = {params ["_unit"]; _unit allowDamage false; _unit action ["eject",train1]; waitUntil {uiSleep 2; !isNull objectParent _unit}; _unit allowDamage true};
  { _x  spawn fn_Jump; nil} count assignedCargo train1; -  on trigger activation gives me an error.

 

GN5jUa.jpg

Share this post


Link to post
Share on other sites
19 hours ago, GEORGE FLOROS GR said:

First of all ,

add below the code and the name of the group to _Group


{	
unassignvehicle _x;
_x action ["Eject", vehicle _x];
}foreach units _Group;

just a question , might be caused from the air velocity ?

can you check it without air ?

 

I did it with the plane almost falling of the sky and they still die and got injured xD

Ill probably be stuck here for some time trying to solve this, but thank you for trying to help..

  • Like 1

Share this post


Link to post
Share on other sites
10 minutes ago, pierremgi said:

You just miss the last line:

  { _x  spawn fn_Jump; nil} count assignedCargo train1;

 

I think the error is on nil and it probably is nul , right ?

 

 

Share this post


Link to post
Share on other sites

No. The code runs fine as is. I tested it. Do not change anything. But try to delete spaces and returns.

What is your condition? mine is:

train1 inArea thisTrigger

 

Share this post


Link to post
Share on other sites
1 minute ago, pierremgi said:

No. The code runs fine as is. I tested it. Do not change anything. But try to delete spaces and returns. Sometimes a copy paste doesn't work straight, due to some word editor compatibility (soething has changed on windows/firefox/forum? I duno).

 

ok ill writte it myself and check it out 😉

Share this post


Link to post
Share on other sites
Just now, Petersang said:

 

ok ill writte it myself and check it out 😉

Don't forget the condition I wrote (and chutes for units)

Share this post


Link to post
Share on other sites

@pierremgi it worked 😉 had just to increse the uiSleep for some more seconds and was fine thanks a lot ! 

 

 

PROBLEM SOLVED...

Share this post


Link to post
Share on other sites
1 minute ago, Petersang said:

@pierremgi it worked 😉 had just to increse the uiSleep for some more seconds and was fine thanks a lot ! 

 

 

PROBLEM SOLVED...

No, you can even remove the uiSleep! Problem came from edition (or condition field?) but believe me, the uiSleep by itself, is not significant here.

Share this post


Link to post
Share on other sites

@pierremgi With the uiSleep in 2 they still die, if i make 30 they dont but then i cant kill them after the land 😂😂

Share this post


Link to post
Share on other sites

Wow! Sure, the sleep was just an insurance for the ejection phase. if you need such big delay (I didn't need any for test), that could mean a very heavy scenario with plenty of running scripts... Do you have any lag?

Share this post


Link to post
Share on other sites

No, I was wondering is there is any condition that could work like allowDamage false until they touch the ground when they do allowDamage becoming true again. I already look for it on the internet but cant find anything like it. 

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

×