Jump to content
Sign in to follow this  
hundredyears

Helo Water Insertion Script

Recommended Posts

I need help in getting set damge to work correctly.

So anyways upon hitting the water my guys die. I just started learning how to script, how do I add a setdamge to false and wait 10 second until setdamge true is turn back on?

Dive.sqf

//Player Init: this addAction ["Dive - seal","dive.sqf",["seal"]];

_per removeAction _act;
player setPosATL [ getPosATL player select 0, (getPosATL player select 1) - 5,
getPosATL player select 2]

Share this post


Link to post
Share on other sites

//Player Init: this addAction ["Dive - seal","dive.sqf",["seal"]];

_per removeAction _act;
player setPosATL [ getPosATL player select 0, (getPosATL player select 1) - 5,
getPosATL player select 2];
player allowdamage false;
sleep 10;
player allowdamage true;

i tested it myself and it works :)

Edited by ryanbeckey0

Share this post


Link to post
Share on other sites

Thank You it work :D But I edit it so it only work 3m away from a chopper here's the code

Add this in your helo Init:

this addAction ["DIVE","dive.sqf","(_target distance _this) < 3"];

//this addAction ["DIVE","dive.sqf","(_target distance _this) < 3"];

player setPosATL [ getPosATL player select 0, (getPosATL player select 1) - 5,
getPosATL player select 2];
player allowdamage false;
sleep 10;
player allowdamage true;

---------- Post added at 08:50 PM ---------- Previous post was at 08:17 PM ----------

The next problem is making it a smooth transition :)

player animate ["Chopperlight_R_Out_H];

I tried putting it in the script but it conflicted and i was stucked in the chopper. and i'm thinking set the position to -1 or -0 instead of 5 so it will get out the door?

maybe the get out of bench animation work for little bird :)

Share this post


Link to post
Share on other sites

got it to work :) with the ka 60 (black)

//this addAction ["DIVE","dive.sqf","(_target distance _this) < 3"];

player playmove "Chopperlight_R_Out_H";
player setPosATL [ getPosATL player select 0, (getPosATL player select 1) - 5,
getPosATL player select 2];
player allowdamage false;
sleep 10;
player allowdamage true;

Edited by ryanbeckey0

Share this post


Link to post
Share on other sites

I made it work using this, i guess if i did the playmove first the player get stucked.

player setPosATL [ getPosATL player select 0, (getPosATL player select 1) - 5,
getPosATL player select 2];

sleep .5;
player playmove ["Chopperlight_R_Out_H];
sleep .5;

player allowdamage false;
sleep 10;
player allowdamage true;

Now my main problem is this is fine in a single player mission. But as soon as i convert my mission to multiplayer other palyer cannot dive. they get teleported a few meter under the chopper and back into it instantly. Again thanks for the help you've been really helpful.

Share this post


Link to post
Share on other sites

let me know if my version works for you in MP

edited my last post with script that works for the ka60 (black)

ps. you dont need the [] to define which animation you only need the ""

Edited by ryanbeckey0

Share this post


Link to post
Share on other sites

Thanks it work :D I'll wait until there's a proper diving animation for now i'll play around with 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
Sign in to follow this  

×