Author Topic: Nocollide 1 with another  (Read 1522 times)

0 Members and 1 Guest are viewing this topic.

Nocollide 1 with another
I have a stray dog barking outside of my house so before I grab my 9mm I'll make this quick.

In a FRED mission of mine I am trying to get a HUGE ship to "undock" with a HUGE station, but no matter how carefully I position the ship I just can't seem to get it wiggle out of their. Anyway to get a ship to nocollide with another object?

 

Offline bigchunk1

  • bigchunk1 = Awesome²
  • 29
  • ...and by awesome I mean Jerk!
Re: Nocollide 1 with another
In a FRED mission of mine I am trying to get a HUGE ship to "undock" with a HUGE station, but no matter how carefully I position the ship I just can't seem to get it wiggle out of their. Anyway to get a ship to nocollide with another object?

I don't know how to do this unless you are modding with tables. You can add a new table entry in the ships.tbl with a class of ship which also has a 'no collide' flag on it. If you are using retail assets, perhaps a .tbm is best for this. You can then use the change-ship-class sexp to swap out the ship in question with the 'no collide' class.

Also keep in mind if you do this, the player has the ability to fly right through the ship in question while it is in 'no collide' mode. Might have to find a creative way to keep the player at a distance, or have the ship in question jump out rather quickly.

I have a stray dog barking outside of my house so before I grab my 9mm I'll make this quick.

If you kill it, please cook it and eat it too  :D
BP Multi
The Antagonist
Zacam: Uh. No, using an effect is okay. But you are literally using the TECHROOM ani as the weapon effect.

  

Offline Sushi

  • Art Critic
  • 211
Re: Nocollide 1 with another
Rejoice! For there is actually a SEXP solution for exactly this: collision groups!

add-to-collision-group
remove-from-collision-group

Arguments are a ship and a number. Collisions between any ships in the group will be ignored. I recently used this for a very similar scenario (fighters launching from bays that were technically too small for them) to great success!

EDIT: The sequence I use:

Mission start: add-to-collision-group ("Big ship", 1)
On launch: add-to-collision-group ("Launching fighter", 1)
Once the fighter has cleared the bay: remove-from-collision-group("Launching fighter", 1)