Jump to content
Sign in to follow this  
NGagedFX

Spawning a vehicle behind a C-130

Recommended Posts

I'm trying to spawn a Striker (M2) behind a C-130, and whereas this works perfectly for other vehicles, the C-130 seems to have an invisible area where it doesn't like vehicles to be spawned. 40m behind it doesn't give any problems, at 30m the Striker will be pushed a little to the side, at 20m it's pushed way to the side which doesn't make any sense. And that why you can drive up a Striker at the back as close as 11m from the mid point (I found those coordinates with the attachTo command). Does anyone know what is going wrong or if it's possible to turn off the collision of an object?

Share this post


Link to post
Share on other sites

Do you just spawn it right behind or do you spawn it then use setPos to make it go behind the C-130? I have found you need a lot of clear space (more than you would think necassary) when you want to spawn a vehicle or object to a location, so I overcame this problem by using setPos to make it go where I wanted after I spawned it.

Share this post


Link to post
Share on other sites

Yes you can turn off collision. You just need to use the full version of createVehicle:

http://community.bistudio.com/wiki/createVehicle_array

and make sure the last parameter is "CAN_COLLIDE".

SetPos does not work in all cases, like spawning a bomb in a vehicle, or putting an object in at least one of the Zargabad housing courtyards (which is weird). Other cases it works great, don't know why.

I also found another oddity with the C-130. I had a group of soldiers spawn around that 30-40m zone from the back of one. After giving them a waypoint, the soldiers closest to the C-130 would walk toward it, instead of the waypoint which was the opposite direction. After moving the C-130 further away, they all go to the waypoint fine.

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  

×