Ok.
1. Put the name of Object_Y in Object_X
IFUSED-property and use the following code for Object_X main script.
;Artificial Intelligence Script
;Header
desc = Proximity Detruct
;Triggers
:state=0:state=1
:state=1,plrwithin=60:state=2,activateifused=1,destroy
;End of Script
You may alternativly use the destroyandactivate.fpi script as Object_X destroy script.
2. Place Object_Y whereever it's about to be spawned. Set the properties of Object_Y to:
Spawn At start? = No
Max At Any Time = 1
Maximum Spawn = 1
Number To Spawn = 1
(The later properties stated should ofcourse reflect how many you intend to spawn. In this example i default that to one.)
Then use the appearspawn.fpi as start script of Object_Y. You may also use your own script in the main script that'll use the command
spawnon whenever you want your entity to appear.