• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Custom Zeds?

Plaugniir

Active member
Jul 18, 2015
38
0
Iowa
I managed to get modified zeds to spawn in the game but I can't alter their AI, I've tried to just add default properties to the zeds but I'm not sure how I can call the AI class from the Zed class.
Could I just create a function inside the zed class to pull the AI? Something like
Code:
function GetThatAI()
{
local customzed;

foreach WorldInfo.AllPawns(class'customzed')
   ControllerClass=class'customzeds.customzed'
}

Or would it be better to just make the custom zed extend KFPawn_Monster and completely rework the DefaultProperties?

EDIT: I managed to get the AI Controller's working, BUT, It's not loading all Zeds and spawning them randomly. It replaced the default zeds with the custom ones. I'm not sure how I can load all default zeds and randomly spawn a few groups of custom ones. I can't edit the spawning archetype in the SDK with custom things?
 
Last edited:
Great, thanks! Once I replaced them it seemed like it would spawn based on the order of the EAIType instead of the zed class it was extended from. Although, I suppose with the custom zed loaded it wasn't converting to AT_Class in the same fashion as the enum.


On another note... is their a way to add cases to an enum? could I just extend that class and create another enum with the custom information and pray that it loads both because of the referenced classes inside of it? Just wondering if it works the same as an array. Doesn't say much on UScript wiki other than it's a primitive data type, But I know with an array you can referencearray.Add(stuffToAdd)
 
Last edited:
Upvote 0