I am trying to dynamically spawn custom creative props at runtime inside of a volume device. All the props spawn just fine, but when they are destroyed by a player or even disposed of with .dispose, I cannot trigger the event of a prop exiting the volume. I have subscribed to the event with “TriggerVolume.PropExitEvent.Subscribe(OnPropExit)” and nothing happens. I have used both a regular volume device and a damage volume without any luck. Has anyone else run into a similar issue and found a solution to this problem?
Hey @SwitchupYT how are you?
The problem here is that if you destroy or dispose a prop, it never exits the volume. In order to exit a volume, a prop must cross the boundaries of that volume in some way.
To make it work, you will need to find a different way to call the function “OnPropExit”. You can try calling it when a prop is destroyed or disposed.
In addition, you can use a logic variable toknow if the prop is inside a volume and then call that function based on the variable value.
Hope this clarifies your problem and helps you to find a way to make your island work!
Unfortunately there isn’t an easy way to do it when a prop is destroyed in game. I already dispose of props after “x” amount of time and use my cleanup logic accordingly, but I need that same logic when a player breaks a prop. I asked the AI assistant and it claims that a prop being destroyed or disposed should also count as leaving the volume, but from my experience so far it seems that is not true. I appreciate the help. I think my best bet is to see if I can find another object to set my props to, that way I can subscribe to an event when the object is eliminated.