PDA

View Full Version : Setting up new placable classes



LordsWarrior
12-13-2009, 06:19 AM
Hiya

IM trying to setup new placable classes for a weapon variant, extending gameWeapon.

My extending goes: (MMG being my game prefix)

Weapon -> GameWeapon -> MMGWeapon ->MMGWeap_Gun


MMGWeapon is the parent class for all MMGWeap_* specific weapons.

Here is simple code for them so far (Im jsut trying to get a mesh visible to start with)


class MMGWeapon extends GameWeapon;

DefaultProperties
{

Begin Object Class=SkeletalMeshComponent Name=PickupMesh
End Object

DroppedPickupMesh=PickupMesh
PickupFactoryMesh=PickupMesh
Mesh = PickupMesh

}


class MMGWeapon extends GameWeapon;

DefaultProperties

{

Begin Object Class=SkeletalMeshComponent Name=PickupMesh

End Object
DroppedPickupMesh=PickupMesh
PickupFactoryMesh=PickupMesh
Mesh = PickupMesh

}

What I get is in the editor I CAN see and ass MMGWeapon_Gun from he actor browser. But I dont see the mesh.
Looking in the View Browsers - primitive stats. I see the mesh is listed, and poly count etc. But lights display 0. Its like the mesh is loaded in correctly but invisible.
Hidden in editor is off in the properties.

Any ideas?

NB: I also had this problem in the tutorial. Where my ish was not visible in the editor when added.:
http://udn.epicgames.com/Three/MasteringUnrealScriptFunctions.html


Thanks

-P

Steve Polge
12-14-2009, 09:22 AM
The Weapon class isn't set up to be placeable. Instead, we use WeaponFactories to place weapons in levels. See UTWeaponFactory for an example.