Jump to content
zooloo75

Is it possible to disable the falling animation of a unit?

Recommended Posts

Step by step:

I've placed a unit on the ground.

I switched his animation via switchMove.

I froze his velocity so he doesn't fall.

I can change the unit's altitude via up and down keys.

Once the unit goes above a certain altitude, he switches to a falling animation.

 

I've already tried switchMove in a loop, but it doesn't allow me rotate my unit around freely -- it locks/resets his rotation.

Share this post


Link to post
Share on other sites

Try with:

_unit disableAI "ANIM";

Might work.

Share this post


Link to post
Share on other sites

Try with:

_unit disableAI "ANIM";

Might work.

That will completely disable the unit from moving.

Share this post


Link to post
Share on other sites

_unit enableSimulation False;

 

...is another option.  The unit is then frozen in current animation though.  Once your unit has been moved to where you want him for whatever effect you are trying to achieve, you can then reenable simulation.  Post your solution when you find it.

Share this post


Link to post
Share on other sites

you could attach an object with a roadway lod right under the feet of the unit and make it invis. i tried that in soem context a while ago. should work just fine.

  • Like 3

Share this post


Link to post
Share on other sites

To get a better idea of the context, I am experimenting with rappelling the side of buildings whilst retaining the ability to aim and shoot.

I'll give your idea a shot Bad Benson.

Share this post


Link to post
Share on other sites

To get a better idea of the context, I am experimenting with rappelling the side of buildings whilst retaining the ability to aim and shoot.

I'll give your idea a shot Bad Benson.

Oh what really? I am VERY interested to see something like this in arma I hope you make it through!

Share this post


Link to post
Share on other sites

Yep! The only problem is that the falling animation ends up overriding the animation I set on the unit, ruining everything. Why is this not an overridable feature?

So far, nothing is stopping the falling animation.

Share this post


Link to post
Share on other sites

Yep! The only problem is that the falling animation ends up overriding the animation I set on the unit, ruining everything. Why is this not an overridable feature?

So far, nothing is stopping the falling animation.

Doesnt the falling animation happen at higher altitudes than 100m?

Share this post


Link to post
Share on other sites

i think you are confusing it with the halo/free fall animation. he's talking about the silly one you also do when you climb onto stuff that isn't prepared professionally (looking at you BI) inside the model (unwalkable).

Share this post


Link to post
Share on other sites

The HALO animation and the "I just walked off a small ledge with a one foot drop" animation.

Share this post


Link to post
Share on other sites

Did you try Bad Benson's suggestion?

 

you could attach an object with a roadway lod right under the feet of the unit and make it invis

Similarly, I've put single pallet objects all over the deck of the fishing trawler, and set them to invisible.   Units can walk on pallets, so it looked like they were walking on deck.  Without the pallets, units fell through the trawler deck.

Share this post


Link to post
Share on other sites

Another idea is to make a "pallet box" with a floor and 4 sides.  Attach the 4 sides to the floor pallet.  Set all pallets invisible.  Put the rappelling unit in the box.  The floor will physically constrain him from falling, and the sides will constrain him from falling off the floor.  You then script the rappel movement to move the floor object down.  (You may also need to script the unit to move down at same rate as floor, so he isn't free falling long enough to trigger the falling animation).

 

I think this has a good chance of working, because in the trawler situation I described, the AI was falling off the sides of the boat, until I put up an invisible pallet barrier to keep him constrained to the deck area.

 

In Arma 1&2 you could attach a unit to an object, and the unit could still turn and shoot.  Sadly that is not true in Arma 3, as that would make this alot easier.

Share this post


Link to post
Share on other sites
On 5/15/2016 at 12:57 PM, bad benson said:

you could attach an object with a roadway lod right under the feet of the unit and make it invis. i tried that in soem context a while ago. should work just fine.

 

This solution still works?

There is a contact memory point where i can attach the pallet?

 

I tried that:

_flyPallet = createVehicle ["Land_Pallet_F",[0,0,0],[],100,"CAN_COLLIDE"];
_flyPallet attachTo [player,player worldToModel ASLToAGL getPosASL player];

But the player still goes into "para fall" animation when he flyes above 100 meters.

Share this post


Link to post
Share on other sites
5 hours ago, Pagoda.br said:

But the player still goes into "para fall" animation when he flyes above 100 meters.

Try attaching unit to pallet instead of pallet to unit.  Also try attaching to a game logic instead of a pallet.  When attached to objects like pallets, the unit's animations get weird and jerky.  When attached to a game logic, the unit's animations are smooth.

  • Like 4

Share this post


Link to post
Share on other sites
2 hours ago, johnnyboy said:

Try attaching unit to pallet instead of pallet to unit.  Also try attaching to a game logic instead of a pallet.  When attached to objects like pallets, the unit's animations get weird and jerky.  When attached to a game logic, the unit's animations are smooth.

 

I tried now. Player can't look around when is attached to a Pallet or a logic.

Share this post


Link to post
Share on other sites
2 hours ago, Pagoda.br said:

I tried now. Player can't look around when is attached to a Pallet or a logic.

BIS broke this in A3.  In A2 an attached unit could move and swivel his gun left and right smoothly while attached.  I actually scripted Fire From Vehicles back then (but never published it) by attaching units to vehicles and allowing them to turn and shoot.

 

What animation do you need while unit is moving/flying?  If its a a sitting animation, you can use the Thai Warfare mod.  They have a chair object that functions as a vehicle, so unit can raise rifle, turn upper body, and shoot (similar to sitting on outside bench of Little Bird helicopter as a shooter).  That chair object can then be attached to some other object, and I'm guessing player would still be able to shoot.  I'm basing that on the fact that you can attach a static machine gun to a vehicle, and player can operate that attached static mg while vehicle is moving.  Also, its possible that the Thai Warfare chair might work with hideObject command, in which case you would see the sitting player but not the chair object.

 

Another option is to use the vanilla zodiac boat object, which you can hide.  Then if you like any of the boat crew animations (some are sitting, and some are laying on sides of boat), then you can hide the boat, and have player board the vehicle in the position you like (sitting or laying down), and then attach or move the invisible boat anyway you want.   This is how I scripted the wooden longboat static object to function as a drivable vehicle in my Longboat script.

  • Like 3

Share this post


Link to post
Share on other sites
1 hour ago, johnnyboy said:

What animation do you need while unit is moving/flying?

 

I will try with the zodiac, thanks for your ideas.

Can be any animation but the player need to have free look and turn his body when i move the mouse right or left. I make the player fly with setVelocity, this makes fly 100% smooth for all players. The setVelocity direction is get by the function getCameraViewDirection player.

  • Like 1

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

×