| Home Page | Recent Changes | Preferences

DarkCornerVolume

I wrote this up for a question on the Atari Forums, but figured it would useful here too. I'm not sure if this works in network play, but I think it probably will. Stuff that has throbbing glow (like some UT pickups had) obviously won't work right with this (it won't have any effect on them).

The purpose of this class is to allow mappers to create dark areas (typically corners, alcoves, or hallways) that players can successfully hide in. Unfortunately, it has to be compiled with ucc rather than in UnrealEd as there's no way to set bStatic to false in UnrealEd.

class DarkCornerVolume extends Volume;

var() float howBright; // 0 = complete black, 1 = regular glow

simulated event touch(Actor A) {
    if (!(A.DrawType == DT_Mesh || A.DrawType == DT_StaticMesh)) return;
    A.AmbientGlow = A.Default.AmbientGlow*howBright;
}

simulated event untouch(Actor A) {
    if (!(A.DrawType == DT_Mesh || A.DrawType == DT_StaticMesh)) return;
    A.AmbientGlow = A.Default.AmbientGlow;
}

defaultproperties
{
   howBright = 0.0;
   bStatic=False
}

inio: Will this work in net play? I think it will but I'm not sure. Someone more experienced should write up a page on [Testing Netcode]?.

Foxpaw: How is this diferent than just having an area with no lights? Players don't have an ambient glow, do they?

inio: Ah, but they do. default ambient glow is 64 I think. Try it - make a default cube, no light, one player start. run the map and "behindview 1".

Mychaeel: You should be able to modify any class default property in UnrealEd by entering "editobj <classname>" in UnrealEd's console. (bStatic will show up in the "None" section.) – Give that a try, and if it works out, add it to this page please.

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In