Jump to content

Make ash piles disappear?


Recommended Posts

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

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

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

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

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

  • Recently Browsing   0 members

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