Jump to content

DestroyObject script


Recommended Posts

There is:

 

DestroyObject

DestroyPlaceable

Safe_Destroy_Object

 

I tried various variations, but I am so bad at scripts

#include "effect_death_h"
void main()
{
    object oPotions = GetObjectByTag ("bdn100ip_static_potions");
    Safe_Destroy_Object (oPotions,0);

}  

What is the correct script to destroy an object? I can create now I need to destroy XD

Link to comment
Share on other sites

It looks like you're trying to destroy to a placeable container in the Noble's Quarter?

 

I would suggest you implement some logging so you can find out if your script is running and what it is doing. You could insert an object existence check and log the results of that. If all else fails, you could start examining the object's variables to see what they are set to and log them, maybe that would give you a clue what is happening and why the game won't destroy it.

 

I explained how to do logging in another thread here: https://forums.nexusmods.com/index.php?/topic/12784350-scripting-a-follower-in-the-fade/

Link to comment
Share on other sites

Actually, I want to preserve that item for the background, but it is used in other areas where I need to remove it.

 

Edit: oof, the area map had used a different tag compared to the UTP, that is why X / Works now! Thank you for helping me look into this.

Edited by HollownessDevoured
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...