Holy hellfire, it works! IT WORKS GOD DAMN IT, SHIT YEAH.
I managed to finish the entire blood and gib system in about a week. Thanks to Core and UArchitect, it actually functions properly. The blood part was trivial, including the decals – all the texturing took the longest to complete. I also have recently implemented a brand new EXUScriptedPawn feature of amazingness, the magnificent SpawnWhenTriggered startup state. But what was a major fucking pain in the god damned ASS was the getting the gibs to cooperate.
Unreal’s carcass/gib system is kind of stupid. When a pawn dies, it spawns a carcass – ok that’s cool, whatever, nothing weird here. The carcass has a fixed amount of health determined by the mass of the original pawn (uh) and once destroyed, spawns a master chunk (what) which then spawns extra chunks from itself (what) and scatters them around. This is totally unnecessary and bizarre but whatever, I decided to roll with it rather than create my own entirely new carcass system from scratch because hey that would probably be a huge pain in the ass and might not even work right because Carcass expands Decoration NATIVE; (thanks guys, I fucking love all this native bullshit) and I didn’t want to risk having my carcasses bug out because they weren’t inheriting some critical piece of native code.
Now then. I actually managed to get allllll the chunk pieces textured properly AND get it so that the gibs would use the proper color depending on the parent pawn’s blood type! Success! With one problem: THE MOTHERFUCKING MASTER CHUNK.
This smug asshole piece of shit little bastard of a gib REFUSED to ever inherit the proper gib texture, somehow, EVEN THOUGH IT SENT THE COLOR TO THE SUBORDINATE CHUNKS IT SPAWNED -AND- IT USED THE PROPER BLOOD SPURT/DECAL COLOR! I don’t know either.
Anyway long story short I was using a bunch of horribly shitty if/else if statements with an init function for each color (AUUUUGGHH) to do the job instead of just sending an enum value to an int in each class and controlling the textures via array numbers. Simplifying the code and fixing some other bullshit in SetAsMaster() in EXUCreatureChunks got the master chunk properly textured HOORAY! Just in time for UA to start working on an entirely new gib system that will probably make mine obsolete \o/ WHO IS THE MASTER CHUNK NOW, BITCH
I AM THE MASTER CHUNK
The whole system was so, so worth it, though. Seeing a map littered with blue, green, black, brown, and white chunks in addition to the sea of red is just so unspeakably hilarious, you have to see it for yourself.
Anyway I also went and implemented a SpawnWhenTriggered state for all of EXU’s pawns, allowing me to spawn pawns right where they are placed in UED with a single flick of their Trigger function! Oh holy shit this is so incredibly useful and saves so much time in the level design process I don’t know why I didn’t do it sooner. Probably because I am a tremendous idiot.
It had a few bugs initially, though, but I fixed most of them. Right now, I have to make this system flexible enough to work for pawns that spawn overlay effects in PostBeginPlay(). I can do this with foreach childactors, but this doesn’t necessarily mean the problem is gone – pawns like Archdemons, which spawn a hurtradius-generating actor on a timer in their PostBeginPlay(), will still be able to damage you even when they are in their stasis state. This is dumb.
I have to figure out a means of preventing these extra actors from actually spawning before the pawn is brought out of its stasis mode if I want it to be flexible enough for things like Archdemons. But in the mean time, at least it works on everything else (except for overlay pawns as I disabled the foreach stuff while investigating alternative methods of hiding/delaying the spawn of overlay effects)!
One last thing: Map 21 is fucking awesome. That is all.