hello
i’d like to know how to add more than one playable character in utgame class so that i can make the player play with specific character in one mission and then switched to another character in another mission .
thank you
hello
i’d like to know how to add more than one playable character in utgame class so that i can make the player play with specific character in one mission and then switched to another character in another mission .
thank you
do you want to do this in code or through kismet?
are your missions all in 1 level or separate levels?
if they are separate levels then use a different variant of the game class for each one as you can specify the DefaultPawnClass in the def props,and that’s it.
if its all one level,you still have the option to choose either code or kismet.let me know and I will post some code or kismet sequences for you to use.
thanks for the reply
no it’s in multiple levels but i want it to be based on the utgame class so i would appreciate it to know how to do it based in kismet through both code and kismet thanks
this piece of code is a kismet sequence.copy the script and the right click in the kismet window and paste.
Begin Object Class=SeqEvent_LevelLoaded Name=SeqEvent_LevelLoaded_0
MaxWidth=136
OutputLinks(0)=(Links=((LinkedOp=SeqAct_ActorFactory'SeqAct_ActorFactory_0')),DrawY=285,OverrideDelta=14)
OutputLinks(1)=(DrawY=306,OverrideDelta=35)
OutputLinks(2)=(DrawY=327,OverrideDelta=56)
ObjInstanceVersion=3
ParentSequence=Sequence'Main_Sequence'
ObjPosX=224
ObjPosY=216
DrawWidth=137
Name="SeqEvent_LevelLoaded_0"
ObjectArchetype=SeqEvent_LevelLoaded'Engine.Default__SeqEvent_LevelLoaded'
End Object
Begin Object Class=SeqAct_ActorFactory Name=SeqAct_ActorFactory_0
Begin Object Class=UTActorFactoryAI Name=UTActorFactoryAI_0
InventoryList(0)=None
TeamIndex=0
Name="UTActorFactoryAI_0"
ObjectArchetype=UTActorFactoryAI'UTGame.Default__UTActorFactoryAI'
End Object
Factory=UTActorFactoryAI'UTActorFactoryAI_0'
InputLinks(0)=(DrawY=317,OverrideDelta=14)
InputLinks(1)=(DrawY=339,OverrideDelta=36)
InputLinks(2)=(DrawY=361,OverrideDelta=58)
InputLinks(3)=(DrawY=383,OverrideDelta=80)
OutputLinks(0)=(Links=((LinkedOp=SeqAct_Possess'SeqAct_Possess_0')),DrawY=328,OverrideDelta=25)
OutputLinks(1)=(DrawY=372,OverrideDelta=69)
VariableLinks(0)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_0'),DrawX=494,OverrideDelta=16)
VariableLinks(1)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_1'),DrawX=562,OverrideDelta=76)
VariableLinks(2)=(DrawX=630,OverrideDelta=152)
VariableLinks(3)=(DrawX=698,OverrideDelta=212)
VariableLinks(4)=(DrawX=776,OverrideDelta=289)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=456
ObjPosY=280
DrawWidth=368
DrawHeight=149
Name="SeqAct_ActorFactory_0"
ObjectArchetype=SeqAct_ActorFactory'Engine.Default__SeqAct_ActorFactory'
End Object
Begin Object Class=SeqVar_Object Name=SeqVar_Object_0
ObjValue=PlayerStart'PlayerStart_0'
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=462
ObjPosY=449
DrawWidth=32
DrawHeight=32
Name="SeqVar_Object_0"
ObjectArchetype=SeqVar_Object'Engine.Default__SeqVar_Object'
End Object
Begin Object Class=SeqVar_Object Name=SeqVar_Object_1
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=880
ObjPosY=560
DrawWidth=32
DrawHeight=32
Name="SeqVar_Object_1"
ObjectArchetype=SeqVar_Object'Engine.Default__SeqVar_Object'
End Object
Begin Object Class=SeqAct_Possess Name=SeqAct_Possess_0
bKillOldPawn=True
InputLinks(0)=(DrawY=338,OverrideDelta=11)
OutputLinks(0)=(DrawY=338,OverrideDelta=11)
VariableLinks(0)=(LinkedVariables=(SeqVar_Player'SeqVar_Player_0'),DrawX=942,OverrideDelta=16)
VariableLinks(1)=(LinkedVariables=(SeqVar_Object'SeqVar_Object_1'),DrawX=1004,OverrideDelta=76)
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=904
ObjPosY=304
DrawWidth=141
DrawHeight=77
Name="SeqAct_Possess_0"
ObjectArchetype=SeqAct_Possess'Engine.Default__SeqAct_Possess'
End Object
Begin Object Class=SeqVar_Player Name=SeqVar_Player_0
bAllPlayers=False
ObjInstanceVersion=1
ParentSequence=Sequence'Main_Sequence'
ObjPosX=888
ObjPosY=424
DrawWidth=32
DrawHeight=32
Name="SeqVar_Player_0"
ObjectArchetype=SeqVar_Player'Engine.Default__SeqVar_Player'
End Object
you just need to set the pawn class in the actor factory and set the spawn point to a different 1 than the player spawns from.
unsure of how familiar you are with uscript so I will start at the basic level.
class darkspace_game_a extends UTGame
config(game);
defaultproperties
{
DefaultPawnClass=class'utpawn'
}
class darkspace_game_b extends UTGame
config(game);
defaultproperties
{
DefaultPawnClass=class'someother_pawn'
}
with 2 gametypes you can have different pawn classes as default.simply set the gametype as required in the editor.
of coarse,you can get a lot more fancy if you want.
And you can use this to just change your player mesh in kismet.Just remember that your characters need to share the same rig.(not my code)
thank you , can i use this code with a character with different animtree ?
yes,all the above examples will work.
thank you so much you saved my project thanks alot