Coladebote 46 Posted May 28, 2021 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
sarogahtyp 1109 Posted May 28, 2021 Where is the problem? Just set allowDammage true after a short sleep. 1 1 Share this post Link to post Share on other sites
Coladebote 46 Posted May 28, 2021 The truth is that he had not thought about this possibility. Something like that? _this allowDamage false; sleep 4; _this allowDamage true; 1 Share this post Link to post Share on other sites
JohnKalo 657 Posted May 28, 2021 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
Coladebote 46 Posted May 28, 2021 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
pierremgi 4934 Posted May 29, 2021 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. 2 1 Share this post Link to post Share on other sites
Coladebote 46 Posted May 30, 2021 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