PDA

View Full Version : A Karma based barrel to shoot around...



legacy-Tatsu[opera]
06-24-2003, 12:13 AM
Anyone know of a tutorial to create a Karma boject that acts like a basketball. Basically you can shoot it and it moves around like a ball or one of the barrels in Devistation? (Another Unreal engine game)

Any help is appreciated. It isnt for me, but I know someone who is looking high and lot for it. Thanks!

legacy-HarvesterUT
06-24-2003, 01:02 AM
find the barrel static mesh in one of the packages...or use any mesh u want. then in the mesh browser, give the mesh karma collision, save it in myLevel, and then "add karma object" to level. place the thing where u want it...play the map, and shoot it around.

legacy-Tatsu[opera]
06-24-2003, 05:54 AM
Do you know if there is a way to have the kactor react to player contact? Can you make it pushable by the player?

legacy-Anthony [Bean]
06-24-2003, 11:06 AM
It needs to be programmed in.

talk to the coder on your project about making a kactor sub class that applies a KActor Impulse on player touch.

legacy-Tatsu[opera]
06-24-2003, 06:03 PM
Thanks, Bean...old bean. :D

legacy-HomeydaKlown
06-26-2003, 01:13 AM
You should be able to make it react to player contact with the default kactor properties. Go into the object's properties and look around a bit, it's there.

legacy-SoSilencer
06-26-2003, 03:53 PM
Keep in mind that karma is clientside so this will not work and can cause trouble if you try to play the map online.

legacy-acc
06-26-2003, 03:55 PM
I distinctly remember reading that there is no support for players pushing karma objects (I was trying to make swinging doors). It requires more coding.

legacy-Tatsu[opera]
06-26-2003, 05:35 PM
UPDATE:

In order to help a friend out I have been dorking about with this and here is what I have discovered...

- Karma based objects function in a multiplayer environment...for the most part. Seems that the moment someone else joins you all hell breaks loose. Errors and all kinds of crap.
- You cannot simply check a box to make Karma objects move when pushed. You have to alter the KActor code as someone suggested and EITHER save it you a mutator ".U" file or the myLevel package
- Karma object SERIOUSLY screw with frame rates.

All of this confuses me because the little rocks from the bulldog driving dont screw with any of this stuff and they are supposedly Karma based. You can push them, they bounce around and **** and they work online. I need to look into this before my programmer friend loses his mind. Thanks people!

legacy-JaFO(JBE)
06-26-2003, 07:48 PM
Those little rocks are probably meshes from a particle emitter.
Like the 'dustclouds' & 'steam' in the levels they're affected by explosions and such ...

legacy-Streetgrime
10-02-2003, 08:21 PM
So?

Do we all agree that Characters can NOT push Karma actors around? Even in a single player environment?

or do I have to keep investigating this?

legacy-KillBait!
10-03-2003, 01:24 AM
Pushing Karma objects are certainly possible and making it work online is possible aswell. It does require extra server bandwidth (depends on how many objects you have going at the same time)

The LawDogs mod has pushable karma and it works online :) , i'm no coder, so i don't know how it was done, but, it has been used in maps for the mod.

legacy-Mr Evil
10-03-2003, 07:38 AM
Code to make Karma work online is available on the Wiki: http://wiki.beyondunreal.com/wiki/KActor_Replication

A very simple bit of code to make KActors pushable by players:

simulated event Bump(Actor Other)
{
if(!bPushable || Other == None)
return;

if(VSize(Other.Velocity) < 0.001)
return;

KAddImpulse(Other.Velocity * Other.Mass * PushFactor, Other.Location);
}
Note that that is a very simplified model that is nothing like the real laws of physics.

legacy-BabyNuke
10-03-2003, 08:27 AM
http://udn.epicgames.com/pub/Content/KarmaExampleUT2003/

Download that example map

legacy-Buckyfg
10-04-2003, 12:03 AM
Mr Evil to the coding rescue once again :)

I actually have 6 Karma objects in Marsbase3000 which I released last NOV, and you could shoot them around and use for cover in SINGLE player but they didnt work AT ALL online, but they didnt crash the game or mess anything up either. they just rolled a bit the first time the map was loaded than stayed solid after that.

legacy-FOZZI
10-04-2003, 07:02 AM
Originally posted by BabyNuke
http://udn.epicgames.com/pub/Content/KarmaExampleUT2003/

Download that example map
And that helps how exactly?
I dont think you read any of this thread.

legacy-BabyNuke
10-04-2003, 10:08 AM
Has two pipes that can be blown around. It's a nice example, ain't it?

detour187
12-25-2009, 05:15 PM
Code to make Karma work online is available on the Wiki: http://wiki.beyondunreal.com/wiki/KActor_Replication

A very simple bit of code to make KActors pushable by players:

simulated event Bump(Actor Other)
{
if(!bPushable || Other == None)
return;

if(VSize(Other.Velocity) < 0.001)
return;

KAddImpulse(Other.Velocity * Other.Mass * PushFactor, Other.Location);
}
Note that that is a very simplified model that is nothing like the real laws of physics.

this is a stupid question but how and where do i use that script code?

Sonix
12-25-2009, 06:40 PM
huge necro!