Im trying to make it where a specific mobile when is spawned, in turn spawns a static wall in place. If the mobile is killed the wall will despawn or disappear. but the wall will respawn when the mobile does as well.
 
Maybe one of the XML Spawner gurus can answer this better, but it seems to me that if you make it so that he always spawns with a spawner in his pack, and that on that spawner it has the static wall appearing at that location, that should do it. Because it would definitely go away when the Mobile did. As far as scripting it goes, despawning is the same as deleting, so if you create the static wall in the constructor of the Mobile, and delete the wall in the OnDelete() method of the Mobile, that should also do it.
 
If your goal is to use XML spawner, I can't help with that.
I get around the problem with adding things on creation of a mobile or item by starting a timer with timespan zero and it never runs again.

( i already have a cavetroll script but not one with the walls that add or delete with the mobile )
 
you might be right dude, it might be the better way. It would make me have to craft one for each instance unfortunately. Thanks for the nudge, I need to start making headway with this.
 
got it working, just need to refine the code and then i'll share if you want

edit:
tip: you need to make it so the wall summons the cavetroll so you can use the OnBeforeDeath method on the mobile to delete the wall
 
Last edited:
script is now in good shape. only thing i need to figure out is the teleporters to let a player get out of the walled in area.
 
spawn the wall at location 5401, 83, 10
 

Attachments

  • CaveTroll.cs
    2.7 KB · Views: 2
  • ShameWall_1.cs
    2.9 KB · Views: 1
Back