tModLoader Spawning Gore using a projectile?

POCKETS

Terrarian
Alright, so here's what I need to do for this one -

I have a projectile that will stick into the ground, and then explode after it dies. I'm familiar with the process of spawning new projectiles for things like explosions, but I've never worked with Gore before.

I need a splatter pattern to happen with the projectile explosion. Imagine that the projectile explodes, and then pieces of it drop to the ground and then disappear after a certain time frame. That's basically what I'm after.

I've taken a look at a couple of open source mods that leave me a bit.. confused, and the examplemod stuff is extremely limited when it comes to Gore. Does anyone have a bit of experience in this area?

What would be the best way to achieve this effect?
 
I'm going to continue our previous discussion here, for the sake of not straying too far from the topic. :p

What you're trying to do seems to actually be rather straightforward, so I'm not entirely sure where you are getting stuck. Are you having trouble spawning the gore? Having it 'splatter' properly? Having it stick to tiles?
 
I'm going to continue our previous discussion here, for the sake of not straying too far from the topic.

I figured you'd continue here, so that's cool ;-)

What you're trying to do seems to actually be rather straightforward, so I'm not entirely sure where you are getting stuck. Are you having trouble spawning the gore? Having it 'splatter' properly? Having it stick to tiles?

As far as spawning the Gore, I'm assuming it's just Gore.NewGore(parameters)? I suppose my question has more to do with the intricacies of what I'm trying to accomplish overall, such as allowing the gore to be visible a certain amount of time, and also making sure it doesn't go too far (I'm assuming this is done using the velocity parameter). Is the amount of time the gore sticks to the ground hardcoded, or is that something I can mess with? One more important detail I'd like to implement is having the gore not move at all once it hits a tile, or ground, similar to blood splatter. I know that some gore will roll along the ground, so I wanted to be sure that doesn't happen.

It looks like the parameters for gore have all the necessary things I'd need to make this work, except for duration. Although, I'm looking at a very old guide, so perhaps that's been added since then?

Other than that, you're right. It seems fairly straightforward. If you have any suggestions as far as the visibility duration and not moving once it hits the tile/ground, that'd be great :)

EDIT: I was just thinking... is duration something that's coded into the gore class itself? I don't know why I didn't think of that...
 
Last edited:
I figured you'd continue here, so that's cool ;-)



As far as spawning the Gore, I'm assuming it's just Gore.NewGore(parameters)? I suppose my question has more to do with the intricacies of what I'm trying to accomplish overall, such as allowing the gore to be visible a certain amount of time, and also making sure it doesn't go too far (I'm assuming this is done using the velocity parameter). Is the amount of time the gore sticks to the ground hardcoded, or is that something I can mess with? One more important detail I'd like to implement is having the gore not move at all once it hits a tile, or ground, similar to blood splatter. I know that some gore will roll along the ground, so I wanted to be sure that doesn't happen.

It looks like the parameters for gore have all the necessary things I'd need to make this work, except for duration. Although, I'm looking at a very old guide, so perhaps that's been added since then?

Other than that, you're right. It seems fairly straightforward. If you have any suggestions as far as the visibility duration and not moving once it hits the tile/ground, that'd be great :)

EDIT: I was just thinking... is duration something that's coded into the gore class itself? I don't know why I didn't think of that...
Both are these are fields within Gore itself, yes. Duration is timeLeft, which has a default value of 600 (ticks) but can be manually set after spawning, and sticking to tiles can be done by setting sticky to true.
 
Both are these are fields within Gore itself, yes. Duration is timeLeft, which has a default value of 600 (ticks) but can be manually set after spawning, and sticking to tiles can be done by setting sticky to true.

Thank you! Seems very simple to accomplish.
 
Back
Top Bottom