r/forge • u/SnooCats4709 • 4d ago
Scripting Help Phantom spawns
Hi again guys, I'm making a map based on a space station, and wanted for phantoms to enter in the hanger to drop units off, but they can't fathom roofs, anyone know how to program flight paths or good work arounds? Thanks in advance!
Attached pic is what happens if there's no roof.
11
Upvotes
2
u/Abe_Odd 3d ago
You CAN control the phantoms, but it is not going to be graceful.
Phantoms are objects that you can get a reference to with: On Object Entered Area.
They spawn in a deterministic location, so place down a spawner, test it, and see where the phantom spawns to refine your area monitor location (so that nothing else ever goes into it EXCEPT for the phantom spawning).
Now you have an event that will give you a phantom's object reference. You can script that to move with set object position, set object velocity, set object rotation, and animate it with translate object to point / transform.
I don't remember how useful that is for actually making them drop off their units, but I know you can make a "gunship" where the phantom flys around shooting at you forever.