Thanks for the prompt reply and for having a look,
Tried your Ctrl+X and Ctrl+V method, the pickup is now affected by the normal lighting in the editor but remains unlit in the game. I also gave the PostBeginPlay() thing a go, here's what my script looks like at the moment with other attempts commented in/out.
Code:
class WD_MedKit extends UTPickupFactory_MediumHealth;
//simulated function PostBeginPlay()
//{
// LightEnvironment.Setenabled(False); // -- Pickup is unlit in the editor and game. (shows up black)
//}
defaultproperties
{
bIsSuperItem=false
RespawnTime=30.000000
HealingAmount=20
// PickupSound=SoundCue'' // -- Different sound will be added later.
bRotatingPickup=false
bFloatingPickup=false
PickupMessage="MedKit"
Components.Remove(BaseMeshComp) // -- Removes the pickup base mesh.
// Components.Remove(PickupLightEnvironment) // -- Doesn't do anything.
Components.Remove(GlowComp) // -- Removes glow effect from the base mesh.
Begin Object Name=PickupLightEnvironment
bEnabled=False
End Object // -- Pickup appears lit in editor after full rebuild, but black in-game.
// Begin Object Name=PickupLightEnvironment ObjName=DynamicLightEnvironmentComponent_15 Archetype=DynamicLightEnvironmentComponent'UTGame.Default__UTHealthPickupFactory:PickupLightEnvironment'
// bEnabled=False
// Name="DynamicLightEnvironmentComponent_15"
// ObjectArchetype=DynamicLightEnvironmentComponent'UTGame.Default__UTHealthPickupFactory:PickupLightEnvironment'
// End Object // -- Pickup appears lit in editor after full rebuild, but black in-game.
Begin Object Name=HealthPickUpMesh
StaticMesh=StaticMesh'WD_Items.Mesh.MedKit'
Translation=(Z=-44) // -- The pickup sits on the floor instead of mid-air.
End Object
}
Bookmarks