Results 1 to 6 of 6
  1. #1

    Default pickup lights problem. (solved)

    Hi there,

    Is there a way to make an item or weapon pickup not be lit by pickup lights, but instead be lit by the normal lights of a level? Coding isn't one of my strengths, but if anyone could hint or point me in the right direction or better, to a specific property I need to override I'd be happy to have another crack at it. The only thing that's stood out to me so far is this:

    Code:
    LightEnvironment=PickupLightEnvironment
    I have no idea what the name is of the light environment I want to use though, or if that's even the culprit.
    Last edited by Winter Dragon; 08-18-2012 at 06:04 AM.

  2. #2
    MSgt. Shooter Person
    Join Date
    Sep 2009
    Location
    Arlington, TX
    Posts
    372

    Default

    That is the culprit. Pickup lights do not have to be present, you can just ignore the build log message. You can disable the light environment when you build your level:
    Add pickups as normal.
    Select all your pickups.
    Press CTRL+X
    Open a text editor like Notepad++, etc.
    Press CTRL+V
    Press CTRL+F, search for the phrase, "Name="DynamicLightEnvironmentComponent_"
    Add this to each section found with your search: "bEnabled=False".
    so that it looks similar to the following:

    Code:
             Begin Object Class=DynamicLightEnvironmentComponent Name=PickupLightEnvironment ObjName=DynamicLightEnvironmentComponent_15 Archetype=DynamicLightEnvironmentComponent'UTGame.Default__UTWeaponPickupFactory:PickupLightEnvironment'
                bEnabled=False
    			Name="DynamicLightEnvironmentComponent_15"
                ObjectArchetype=DynamicLightEnvironmentComponent'UTGame.Default__UTWeaponPickupFactory:PickupLightEnvironment'
             End Object
    Press F3, or do whatever it takes to find the rest of DynamicLightEnvironmentComponents Objects in your text editor and also disable those, as above.
    Hit CTRL+A in your notepad or whatever.
    Hit CTRL+C.
    Go back to Unreal Editor.
    Hit CTRL+V.
    Build All & Save.
    The rest depends on your lighting channels.

    If you are building special pickups, in script, I think you can just add LightEnvironment.Setenabled(False); in postbeginplay.
    Last edited by NickG; 08-17-2012 at 03:07 PM.
    Narayana*SIG*

  3. #3

    Default

    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
    }
    Last edited by Winter Dragon; 08-17-2012 at 10:52 PM.

  4. #4
    MSgt. Shooter Person
    Join Date
    Sep 2009
    Location
    Arlington, TX
    Posts
    372

    Default

    The rest depends on your lighting channels. I don't know what type of lights you are using. Try enabling/forcing the Dynamic channel on them from the editline window(F4). Cut/Copy+Paste method works in game.
    Narayana*SIG*

  5. #5

    Default

    Thankyou, it's a relief to finally have that sorted. When I made the lights dynamic my weapons stopped being lit, but ticking the gameplay channels have fixed it again. I'll mark the thread as solved.

  6. #6
    MSgt. Shooter Person
    Join Date
    Sep 2009
    Location
    Arlington, TX
    Posts
    372

    Default

    Congrats/Thanks for finding the correct channel; I had just enabled all in my tests. Good luck with your work(s).
    Narayana*SIG*


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.