Jump to content

Recommended Posts

Hi guys, I created a helicopter base in the middle of a forest, with a very uneven surface, so I had to build a runway with airport platforms. Helicopters appear by script on this platform. The problem is that when the helicopters appear, some explode. To avoid this I have used the following line of code:
_this allowDamage false;

The problem is that, in this way, the helicopters cannot be destroyed, so I would like the protection against the damage to be only temporary, that is, until the helicopters appear on the surface without being destroyed and, afterwards, they recover the damage. .

Can somebody help me?

Thanks.

Share this post


Link to post
Share on other sites

Where is the problem? Just set allowDammage true after a short sleep.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

The truth is that he had not thought about this possibility.
Something like that?
_this allowDamage false;
sleep 4;
_this allowDamage true;

  • Like 1

Share this post


Link to post
Share on other sites

Or to avoid sleep which might still make them take damage you can place a distance between the platform and the chopper condition too. Just in case the chopper takes some time to take off and blows up in the process.

Share this post


Link to post
Share on other sites

It is a base built on the map where the helicopters explode when the script is activated and appear. The problem occurs when the helicopter is positioned on the surface.

 

Share this post


Link to post
Share on other sites
12 hours ago, Coladebote said:

It is a base built on the map where the helicopters explode when the script is activated and appear. The problem occurs when the helicopter is positioned on the surface.

 

Did you test to spawn them a little bit higher? (say 0.5 meter)
let's say you are spawning on _pos. You could try to spawn at (_pos vectorAdd [0,0,0.5])

No tested.

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Indeed, Pierre, it may be a solution, because with two antiaircraft it also occurred and raising the height from 6 to 6.1 meters, it has been resolved. I always appreciate your help very much. Thanks.

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

×