Adding a NPC



  • Would someone be so kind to tell me how I can add a NPC?

    Just a peasant like those on Stoneshill. He should stand in an idle postion (not t-pose), be able to get hit by a weapon but take 0 damage. I tried to find out how it’s done on Stoneshill and Darkforest but wasn’t succesful.



  • Here’s the code to spawn a peasant, and tell it to move somewhere:

    ! Begin Object Class=SeqAct_AttachToEvent Name=SeqAct_AttachToEvent_6
    ! InputLinks(0)=(DrawY=-1846,OverrideDelta=11)
    ! OutputLinks(0)=(Links=((LinkedOp=AOCSeqAction_AISetNPCMoveTarget’AOCSeqAction_AISetNPCMoveTarget_7’)),DrawY=-1846,OverrideDelta=11)
    ! VariableLinks(0)=(LinkedVariables=(SeqVar_Object’SeqVar_Object_97’),DrawX=-5212,OverrideDelta=16)
    ! EventLinks(0)=(LinkedEvents=(SeqEvent_Death’SeqEvent_Death_52’),DrawX=-5146,OverrideDelta=93)
    ! ObjInstanceVersion=1
    ! ParentSequence=Sequence’Main_Sequence’
    ! ObjPosX=-5258
    ! ObjPosY=-1880
    ! DrawWidth=147
    ! DrawHeight=61
    ! Name=“SeqAct_AttachToEvent_6”
    ! ObjectArchetype=SeqAct_AttachToEvent’Engine.Default__SeqAct_AttachToEvent’
    ! End Object
    ! Begin Object Class=SeqVar_Object Name=SeqVar_Object_97
    ! VarName=“Peasant_01”
    ! ObjInstanceVersion=1
    ! ParentSequence=Sequence’Main_Sequence’
    ! ObjPosX=-5304
    ! ObjPosY=-1624
    ! DrawWidth=32
    ! DrawHeight=32
    ! Name=“SeqVar_Object_97”
    ! ObjectArchetype=SeqVar_Object’Engine.Default__SeqVar_Object’
    ! End Object
    ! Begin Object Class=AOCSeqAction_AISetNPCMoveTarget Name=AOCSeqAction_AISetNPCMoveTarget_7
    ! InputLinks(0)=(DrawY=-1730,OverrideDelta=47)
    ! OutputLinks(0)=(DrawY=-1763,OverrideDelta=14)
    ! OutputLinks(1)=(DrawY=-1741,OverrideDelta=36)
    ! OutputLinks(2)=(DrawY=-1719,OverrideDelta=58)
    ! OutputLinks(3)=(DrawY=-1697,OverrideDelta=80)
    ! VariableLinks(0)=(LinkedVariables=(SeqVar_Object’SeqVar_Object_97’),DrawX=-4985,OverrideDelta=50)
    ! VariableLinks(1)=(DrawX=-4934,OverrideDelta=92)
    ! ObjInstanceVersion=1
    ! ParentSequence=Sequence’Main_Sequence’
    ! ObjPosX=-5048
    ! ObjPosY=-1800
    ! DrawWidth=187
    ! DrawHeight=133
    ! Name=“AOCSeqAction_AISetNPCMoveTarget_7”
    ! ObjectArchetype=AOCSeqAction_AISetNPCMoveTarget’AOC.Default__AOCSeqAction_AISetNPCMoveTarget’
    ! End Object
    ! Begin Object Class=AOCSeqAction_AISpawnNPC_KillObjective Name=AOCSeqAction_AISpawnNPC_KillObjective_7
    ! Begin Object Class=SkeletalMeshComponent Name=WSkeletalMeshComponent0 ObjName=SkeletalMeshComponent_647 Archetype=SkeletalMeshComponent’AOC.Default__AOCSeqAction_AISpawnNPC_KillObjective:WSkeletalMeshComponent0’
    ! SkeletalMesh=SkeletalMesh’CH_A_Vanguard_PKG.SkeletalMesh.3P_A_Vanguard_SKELMESH’
    ! MinDistFactorForKinematicUpdate=0.200000
    ! bUpdateSkelWhenNotRendered=False
    ! bIgnoreControllersWhenNotRendered=True
    ! bHasPhysicsAssetInstance=True
    ! bOverrideAttachmentOwnerVisibility=True
    ! bChartDistanceFactor=True
    ! bCacheAnimSequenceNodes=False
    ! ReplacementPrimitive=None
    ! RBChannel=RBCC_Untitled3
    ! RBDominanceGroup=20
    ! HiddenGame=True
    ! bUseOnePassLightingOnTranslucency=True
    ! BlockRigidBody=True
    ! RBCollideWithChannels=(Untitled3=True)
    ! Translation=(X=0.000000,Y=0.000000,Z=-10.000000)
    ! Name=“SkeletalMeshComponent_647”
    ! ObjectArchetype=SkeletalMeshComponent’AOC.Default__AOCSeqAction_AISpawnNPC_KillObjective:WSkeletalMeshComponent0’
    ! End Object
    ! MySkeletalMesh=SkeletalMeshComponent’SkeletalMeshComponent_647’
    ! MaxHealth=20
    ! MyName=“Dirty Derek”
    ! InputLinks(0)=(DrawY=-1762,OverrideDelta=23)
    ! OutputLinks(0)=(Links=((LinkedOp=SeqAct_AttachToEvent’SeqAct_AttachToEvent_6’)),DrawY=-1772,OverrideDelta=13)
    ! OutputLinks(1)=(DrawY=-1752,OverrideDelta=33)
    ! VariableLinks(0)=(LinkedVariables=(SeqVar_Object’SeqVar_Object_67’),DrawX=-5433,OverrideDelta=27)
    ! VariableLinks(1)=(LinkedVariables=(SeqVar_Object’SeqVar_Object_97’),DrawX=-5365,OverrideDelta=87)
    ! ObjInstanceVersion=1
    ! ParentSequence=Sequence’Main_Sequence’
    ! ObjPosX=-5482
    ! ObjPosY=-1808
    ! DrawWidth=175
    ! DrawHeight=101
    ! Name=“AOCSeqAction_AISpawnNPC_KillObjective_7”
    ! ObjectArchetype=AOCSeqAction_AISpawnNPC_KillObjective’AOC.Default__AOCSeqAction_AISpawnNPC_KillObjective’
    ! End Object
    ! Begin Object Class=SeqEvent_Death Name=SeqEvent_Death_52
    ! MaxWidth=96
    ! OutputLinks(0)=(Links=((LinkedOp=SeqCond_Increment’SeqCond_Increment_0’),(LinkedOp=SeqAct_Log’SeqAct_Log_0’)),DrawY=-1630,OverrideDelta=11)
    ! VariableLinks(0)=(DrawX=-4632,OverrideDelta=16)
    ! ObjInstanceVersion=1
    ! ParentSequence=Sequence’Main_Sequence’
    ! ObjPosX=-4680
    ! ObjPosY=-1696
    ! DrawWidth=68
    ! DrawHeight=128
    ! Name=“SeqEvent_Death_52”
    ! ObjectArchetype=SeqEvent_Death’Engine.Default__SeqEvent_Death’
    ! End Object

    If you need anymore details let me know.



  • Thanks for your reply! This is more complicated than I hoped it would be, dayum. My first question would be, where do I put this code? :)



  • Ok I have just tried this…as code seems like it is supposed to work like a Snippet. Paste into Kismet…it gives you Kismet sequence. Then place a note or path node in the map where you want it to spawn and the while it is selected… right click in Kismet and place a Variable of the Path node or Note and hook it up to the Spawn Point Node. Woola…Peasant running around in map! Thank you Dr z0b



  • Thanks guys, got it running!



  • Sorry I should have been clearer about what to do with the code. Thanks for helping there MG-Powers.



  • No Problem Dr.Z Glad to help.


Log in to reply