cypher2012 Posted August 30, 2017 Share Posted August 30, 2017 Hey guys, I have some code that goes through an array of actors and sets all critical stage to "CritStage_DisintegrateEnd" to essentially delete them. This works perfectly expect for one scenario. A user of my mod noticed that when using laser rifles, ash piles/puddles are not de-spawned. Does it create a new object? Here's the function where the de-spawning happens Function ResetActorPool() int i = 0 While i < enemy_actor_pool.Length Debug.MessageBox("Actor in pool") enemy_actor_pool[i].SetCriticalStage(enemy_actor_pool[i].CritStage_DisintegrateEnd) i += 1 EndWhile enemy_actor_pool.Clear() EndFunction I used the Message box just so I could check that the code was looping the expected number of times and it is. So the actual actor is in the enemy_actor_pool array, but it's ash pile/puddle doesn't get deleted. Link to comment Share on other sites More sharing options...
cypher2012 Posted August 30, 2017 Author Share Posted August 30, 2017 I took a look at the documentation and found the CritStage_GooEnd but I can't seem to get it to work. Here is where I have added it: Function ResetActorPool() int i = 0 While i < enemy_actor_pool.Length Debug.MessageBox("Actor in pool") enemy_actor_pool[i].SetCriticalStage(enemy_actor_pool[i].CritStage_GooEnd) enemy_actor_pool[i].SetCriticalStage(enemy_actor_pool[i].CritStage_DisintegrateEnd) i += 1 EndWhile enemy_actor_pool.Clear() EndFunction Link to comment Share on other sites More sharing options...
cypher2012 Posted August 30, 2017 Author Share Posted August 30, 2017 It's also probably safe to presume that I will have the same issue with frozen enemies. Link to comment Share on other sites More sharing options...
cypher2012 Posted August 30, 2017 Author Share Posted August 30, 2017 Having a look through some resources, it seems the ash piles are a separate object. Any idea how can get a reference to the ash piles in the cell? I've been searching the wiki documentation for any functions that kind of look like the fake ones below. Game.GetAshPiles() Game.GetObjectOfType(AshPileObject) Link to comment Share on other sites More sharing options...
DarkEric99 Posted August 31, 2017 Share Posted August 31, 2017 Hi, you sayed yesterday that frozen enemies could be concerned, so I gave a look, with a flame-thrower and a cryolator, burned or frozen enemies are rightly deleted.By the way, all enemies id inside your arena begin by FF, it must be a way to select stuff inside a cell with an id filter, so you just have to delete them the way you want Link to comment Share on other sites More sharing options...
skubblebubble Posted August 31, 2017 Share Posted August 31, 2017 Don't Call Me Settler has a way of doing it. You could look in there I suppose. It burns the corpses, and those ashpiles do fade out eventually. Link to comment Share on other sites More sharing options...
cypher2012 Posted August 31, 2017 Author Share Posted August 31, 2017 Hi, you sayed yesterday that frozen enemies could be concerned, so I gave a look, with a flame-thrower and a cryolator, burned or frozen enemies are rightly deleted.By the way, all enemies id inside your arena begin by FF, it must be a way to select stuff inside a cell with an id filter, so you just have to delete them the way you want Hey, thanks for checking those for me! That's good to know! Link to comment Share on other sites More sharing options...
Recommended Posts