Forum Jump :

Author Message


Posts: 2
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2020-01-22 20:19        
     
Hello there,

I have created a scenario where an empty boat is dropped out of the back of a stationary C130. The boat falls and the parachute opens. However, it does not slow the boat down.

Currently in a trigger:

In condition:
(getPosATL vehicle boat) select 2 < 750
In Activation:
("I_Parachute_02_F" createVehicle [0,0,0]) attachTo [boat, [0, 0, 0]];
In Deactivation:
if (isTouchingGround boat) then {detach "I_Parachute_02_F";};

I created a seperate radio command as a test of deployment from a higher altitude. It deployed the chute but it did not slow the boat down.

Any help would be very much appreciated.
https://youtu.be/v3hHrLNDImU - Current state.

Added 20 hours 16 minutes later:

Figured out that the boat needs to be attached to the parachute, not the other way around. Just having trouble spawning the parachute above the boat, and then attaching the boat to it.
I currently have:
boat attachTo ["I_Parachute_02_F" createVehicle [0,0,0]];
I am a little stumped though...
Any help would be appreciated. :)

Added 17 hours 46 minutes later:

boat attachTo ["I_Parachute_02_F" createVehicle (getpos boat vectorAdd [0,0,2]), [0,0,0]];
Just tried this, it attaches to the boat correctly, but when the parachute spawns, it jumps the boat underground and the parachute above ground.

This post was edited by Aurora1-4 (2020-01-24 10:48, 33 days ago)


Author Message


Posts: 1522
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2020-02-01 02:23        
     
Yes if you attach the chute to boat the chute in effect takes the boats physics.
Usually people just spawn the chute then spawn and attach a vehicle, this won't work in your case as your trying to attach a chute to a moving vehicle.

Pity you can't swap physics on command as attaching the chute to the vehicle looks better.
I did try attaching chute to boat then after a small delay (fully opened), detach chute and then attach boat to chute.
It worked but gave a nasty flicker.

Another idea was to leave the none functional chute for visual effect and after a few seconds place an invisible chute over the current chute and boat, then attach the boat to that chute, matching velocities and direction it seems to work a little better.
Less flicker but a little messy coding.

para= createVehicle ["I_Parachute_02_F",getpos boat,[], 0, "none"];
 paraV= createVehicle ["I_Parachute_02_F",[0,0,1000],[], 0, "none"];
  para attachto [boat,[0,0,0]];
   paraV hideobject true;

null=[] spawn {
	sleep 2.8;
	paraV setpos getpos para;
	parav setdir getdir para;
	paraV setVelocity (velocity boat);
	 boat attachto [paraV];
	 paraV hideobject false;
	 para hideobject true;
	 deletevehicle para;
	 };


Also this won't work
if (isTouchingGround boat) then {detach "I_Parachute_02_F";};
you can't use a string here you need to name the parachute and use that name.

I found using a height command gave better detachment.
if (getposATL boat select 2 < 5) then  detach boat;

also disable damage for the boat until it's down.
As for spawning on the ground it does when using that creatvehicle format, you have to setpos it after with the correct height.