Jump to content
Sign in to follow this  
roguetrooper

Ammobox attachTo helicopter destroys helicopter ?!

Recommended Posts

I want to attach (http://community.bistudio.com/wiki/attachTo) a small ammobox under a helicopter (Little Bird). This works fine so far, it is exactly positioned and aligned as I want it. It is attached directly under the hull, it barely touches the hull and it does NOT touch the ground when the helicopter has landed.

But seemingly this causes the helicopter to explode (even with "this allowdamage false") after few seconds flying :( (No, there are no hostile units around, it is a so far clear testing map).

It makes the A.I. pilot lift up constantly a few centimeters per second and especially at maneuvers with the nose pointing downwards the helicopter explodes.

Does attachTo influence the physics of an object? Has anyone experience with that or has a workaround at hand?

Edit: Hm, there seems to be a clumsy workaround: triggers with (if height heli: > 0 then attachto + box hideobject false) and (if height heli == 0 then: detach box + box hideobject true). But such popping up and away of visible "physically existing" objects isn't very smooth...)

Edited by RogueTrooper

Share this post


Link to post
Share on other sites

I think the problem is the collision detection and object avoidance. You can attach some things without any problems others cause damage or the chopper to rise into the air when they're too close.

I don't know of any fix and I've tried.

Almost forgot you can use setpos in a loop.

// null =[what,unit,pos] execvm "fixpos.sqf"
// null = [ambox,heli,5] execvm "fixpos.sqf"

_object =  _this select 0;
_unit =  _this select 1;
_pos =  _this select 2;

while {alive _unit} do {
_object setpos [(getpos _unit select 0)+_pos,getpos _unit select 1,getpos _unit select 2];
sleep 0.01;
};

update

Well maybe not, it seemed to work for a while then went crazy.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

I wonder if there's a noclip script command?

That would be a useful command for situations like these.

Share this post


Link to post
Share on other sites

If you spawn an object there is a no_collision setting although I've not noticed it having any effect.

Share this post


Link to post
Share on other sites

There is such a thing, afaik it was used on one of the improvised AC130 to attach M119 to them

*searching

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
Sign in to follow this  

×