Jump to content

Recommended Posts

Hi.

When i shot of vehicle wheel or even all wheels the vehicle damage is still 0

Is there any possibility to define if vehicle has all wheels or not

that it could be available to add some weak damage by script or eventhandler.?

 

I was trying to workaround with canMove but this is returning false only after

the vehicle has minimum two wheel destroyed.

Share this post


Link to post
Share on other sites
Is there any possibility to define if vehicle has all wheels or not
_1 = _vehicle gethit "wheel_1_1_steering";
_2 = _vehicle gethit "wheel_1_2_steering";
_3 = _vehicle gethit "wheel_2_1_steering";
_4 = _vehicle gethit "wheel_2_2_steering";


if (_1 == 0 && _2 == 0 && _3 == 0 && _4 == 0)
     then {hint "Vehicle has lost all wheels"}
     else {hint "Vehicle has all wheels"};

Each wheel has it's own damage level, going from 0 to 1, like all other vehicle parts.

Share this post


Link to post
Share on other sites
_1 = _vehicle gethit "wheel_1_1_steering";
_2 = _vehicle gethit "wheel_1_2_steering";
_3 = _vehicle gethit "wheel_2_1_steering";
_4 = _vehicle gethit "wheel_2_2_steering";


if (_1 = 0 && _2 = 0 && _3 = 0 && _4 = 0)
     then {hint "Vehicle has lost all wheels"}
     else {hint "Vehicle has all wheels"};

Each wheel has it's own damage level, going from 0 to 1, like all other vehicle parts.

This doesn't work, because the if-condition has assignments ("="), but must have comparisons ("==").

 

And just because I could, here's a slightly more efficient version of this: ^_^

if (1 == {
    if (1 == _vehicle getHit ("wheel_" + _x + "_steering")) exitWith {1};
} count ["1_1", "1_2", "2_1", "2_2"]) then {
    hintSilent "Vehicle does not have all wheels anymore.";
} else {
    hintSilent "Vehicle still has all wheels.";
};

Share this post


Link to post
Share on other sites

 

This doesn't work, because the if-condition has assignments ("="), but must have comparisons ("==").

 

Corrected it ! ;)

 

-EDIT-

I didn't notice it at first but nice code there !

 

if (1 == {
    if (1 == _vehicle getHit ("wheel_" + _x + "_steering")) exitWith {1};
} count ["1_1", "1_2", "2_1", "2_2"]) then {
    hintSilent "Vehicle does not have all wheels anymore.";
} else {
    hintSilent "Vehicle still has all wheels.";
};

Share this post


Link to post
Share on other sites

Yee, yee i have corrected this by me self but I resigned from that.

 

This has breaking the immersion.

 

Situation:

 

While driving i lost one of my wheel. The vehicle damage = 0.

Now execute the snippet, vehicle got damage 0.03.

But the vehicle got all wheels again.

This is something that can happen only at arma.

 

If the vehicle lost a wheel is then vehicle damaged isn't it?

No, arma says is not. Ok if i add some damage to fit the realism,

arma damage the vehicle  but vehicle gets all wheels back.

 

Well done

Share this post


Link to post
Share on other sites

Yee, yee i have corrected this by me self but I resigned from that.

 

This has breaking the immersion.

 

Situation:

 

While driving i lost one of my wheel. The vehicle damage = 0.

Now execute the snippet, vehicle got damage 0.03.

But the vehicle got all wheels again.

This is something that can happen only at arma.

 

If the vehicle lost a wheel is then vehicle damaged isn't it?

No, arma says is not. Ok if i add some damage to fit the realism,

arma damage the vehicle  but vehicle gets all wheels back.

 

Well done

 

Which script did you execute, the one above ? If not can you give it to us ?

Share this post


Link to post
Share on other sites
Guest

You know that you can repair parts by parts.

Share this post


Link to post
Share on other sites

You know that you can repair parts by parts.

 

Is it a question ?

Share this post


Link to post
Share on other sites
Guest

There is no question mark. I would bet on no.

Share this post


Link to post
Share on other sites
Guest

Well let me explain better. He is relying on getDamage and setDamage but in his case it could be clever to use hitPoints. And repair them, I mean hitPoints by hitPoints.

I have created a repair which does that. I will give you an exemple.

Share this post


Link to post
Share on other sites

At what point it is written about repairing anything?

Share this post


Link to post
Share on other sites
Guest

Just tell me how the vehicle get his wheels back without even having a setDammage ?

You don't give us all the tools we need, you talk about snippet ? Where the f*** it is ?

Don't blame us, we are just trying to help. Only blame you.

Share this post


Link to post
Share on other sites

I do not need your help. You should help your self and read  what this post  is about.

You mist that.

Share this post


Link to post
Share on other sites

You've created a thread called "vehicle damage" and the only question you've asked is :

Is there any possibility to define if vehicle has all wheels or not ?

 

Heeeere's johnny! has given a code snip solving this problem.

Is there any other problem you need help with Davidoss ?

Share this post


Link to post
Share on other sites

Is there any possibility to define if vehicle has all wheels or not

that it could be available to add some weak damage by script or eventhandler.?

 

 

Thanks to you guys it was achieved. But the main goal was a mistake.

You cant set any weak damage to the vehicle, without giving his wheel back

Share this post


Link to post
Share on other sites

Well let me explain better. He is relying on getDamage and setDamage but in his case it could be clever to use hitPoints. And repair them, I mean hitPoints by hitPoints.

I have created a repair which does that. I will give you an exemple.

 

I'm actually interested in knowing more about it.

 

 

Is there any possibility to define if vehicle has all wheels or not

that it could be available to add some weak damage by script or eventhandler.?

 

Davidoss what's the point of knowing that ?

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

×