Legacy:EricBlade's Journal

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 22:40, 23 March 2006 by EricBlade (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

3/16/06

OK, I've spent the last day and a half trying to figure out just what the hell went wrong in my custom Decoration class. I don't override any code in the base, except to record takedamage() in my debug setup. (or at least i didn't, when it mysteriously stopped working) As far as I can remember, it stopped working as I was working on getting sane defaultproperties, as the defaults for Decoration have virtually everything turned off for some reason. Here's what happens:

I load a level with a nice Decoration in it (in my test case, it's an ATM Machine, although i initially found it had stopped working with a bookcase and a coffee table). I go running full tilt into the ATM machine, and *poof* it disappears.

I reset all the default properties back to normal, recreated it, reloaded the level, and exact same thing.

Here are my default properties, with all the ones that i had changed before the issue started commented out:

     StaticMesh     = StaticMesh'DOTZSIndustrial.Outdoor.WoodenBox'

DrawType = DT_StaticMesh

//bBlockActors = true

//bBlockKarma = true

//bBlockPlayers = true

//bCollideActors = true

//bProjTarget = true

bStatic = false

bStasis = false

//bDamageable = true

//bPushable = true

//PushSound = Sound'DOTZXActionObjects.Crate.CratePush'

//FragType = class'Engine.Fragment'

//FragSkin = Texture'SpecialFX.Particles.rockchunks02'

I have now overridden every function in Decoration, along with a few in Actor, so that I can figure out what the heck the chain of execution is (it really pisses me off that this engine has no apparent way to actually just get a text string of the current execution chain, however it sure can give it to you when you breathe too hard and crash the editor!). Here's what's happening:

 Bump(mypawn) is getting called 4 times
 FellOutOfWorld() is called
 Destroy() then
 Destroyed()
w.t.f?

Yay, Figured it out. It was bCollideWorld. Seems to be an editor issue with this, though, in that if we build all with a decoration with bCollideWorld turned on, the editor takes a trip and crashes.

03/19/06

Anyone versed in Karma?

Is it possible, that Karma might actually be disabled at the engine level?

Just for grins, I wanted an object that I could just kick around, like the computers in Postal 2.. but in Land of the Dead.


So, I pull out my Postal 2 resources, load up the editor, and take a look at the computer in the RWS office. Looks like it's a "KActor", pretty much all default properties (looks like RWS may have added some extra stuff to KActor), so I go back to LOTD-Ed, and load up my test level with all my test stuff in it, and place a KActor, using the static mesh of, a hanging light. Put the light just off the

ceiling, start it up, run into it, and bounce right off, no affect. It's acting like PHYS_None.

Now, can someone correct me if I'm wrong here:


If I give something a nice set of Karma properties (like KActor defaults to), set it's default physics to PHYS_KARMA, and set KStartsEnabled = true, and place it in the middle of open space, the first thing it should do, is fall straight to the nearest floor/other solid object? Right?

I do this, and it just sits there just like any other object placed in the middle of space with phys_none.

Ugh?

SuperApe: Wish I was more competent with Karma, but isn't there a KWake() function that wakes up Karma objects? (evidentally only after it has come to rest, like on the floor) This from Karma Functions And Events:

native final function KWake();
"Wakes up" the actor. This causes the Karma physics to begin simulating after the object has been deemed to be "at rest."

EricBlade: thanks for the help, pretty sure that's not it,though. The object was just sitting there, floating in mid air, even with KStartsEnabled on, even when i shot it, or ran into it with my pawn :(

SuperApe: I only mention it because "floating in mid air", to me, doesn't seem like the Karma object ever came to rest.

EricBlade: Not even sure what the heck I'd do with that.. subclass kactor, and throw in a KWake in the PostBeginPlay?

SuperApe: Perhaps just try it on the floor first.

EricBlade: woot woot, i needed two things, apparently. (1) smeshes designed for use with karma (2) HighDetailOnly = false in the Karmaparams

03/21/06

Yesterday's experiment: Getting player to display on camera-texture-clients in single player mode.

Success: Not easily feasible as far as I can tell. Pfhoenix actually gave me a useful hint as to where to look to try to make this work, and managed to simultaneously educate me as well.

Today's first experiment: Download a couple of useful LWO files from turbosquid, and try and import them.

Success: For some reason my UEd doesn't import LWO files. The only file format supported for SMesh in is 3DS apparently.

Figured out the Karma stuff, at least to an initial degree. woot. Now, must find a way to get karma collision information on all the existing models in the game :-S i bet that's gonna be a task!

03/22/06

w00tness. Severed Karma Heads! with baseball bats, golf clubs, and shovels as our primary weapons, i can see a definite severed zombie head soccer type game in the near future. Just need to make a gametype and some GoalVolumes.

Now, is it possible to make Karma objects actually deal properly with hitting a player? Or is that because the player isn't drawn in single player, that a karma object can fall right through your head, and land at your feet, and you'll suddenly be walking on it? i know that a moving normal actor will not affect a karma actor that is at rest, so that will be an interesting thing to attempt to simulate. I heard of someone on here doing it by spawning a karma actor and attaching it to the player pawn, but i'm curious as to if it stayed attached where it was placed, or if it started simulating.. and how would i make an invisible karma actor, anyway? well, i guess they are already invisible if you don't give them a smesh.. hmm.. *thinks* any thoughts?

eh, n/m, that was waaaaay easier than i thought. In the Pawn's bump(), have it KApplyImpulse to any karma actors that it comes in contact with. not difficult at all. i probably need some sort of foot weapon, to come from underneath it though to get it some lift.