Page 1 of 1

New Physics Volume Question

Posted: 30-01-2008 23:30
by BunnyS
How can I set a 'killing' physics volume to only kill/effect one team ?

:)

Posted: 31-01-2008 00:33
by Goldeneye
iirc there is no option to set a team - but you can easily extend the PhysicsVolume to allow it:

in ued/actor browser rclick on PhysicsVolume (in Actor->Brush->Volume)
select new...
use package mylevel and name myPhysicsVolume (or any other, but you'll have to adapt the following code snippet then as well)

in the opened editor paste this:

Code: Select all

//===============================================
// MyPhysicsVolume.
//===============================================
class MyPhysicsVolume extends PhysicsVolume
	placeable;

var(PhysicsVolume) byte team;

event CausePainTo(Actor Other)
{
	if(DB_Pawn(Other) != None && team != 255 
		&& DB_Pawn(Other).PlayerReplicationInfo.Team.TeamIndex != team)
	{
		return;
	}
	super.CausePainTo(Other);
}


and compile it (Tools->Compile Changed).

Now add the MyPhysicsVolume instead of the PhysicsVolume - set it bPainCausing and a damage value and type as well as the team (0=red, 1=blue, 255 = any)

Posted: 31-01-2008 02:35
by BunnyS
"damage value and type as well as the team (0=red, 1=blue, 255 = any)"

damage value ? not sure what you mean. I have set the type to none so it just says "X dies"

and I'm not sure where to add the team bits :o

I tried

Event = CausePainTo
Exclude tag = 0

or I also tried "DB_Pawn0"

Posted: 31-01-2008 15:02
by Goldeneye
with damagevalue i meant damagepersec and i wasn't sure if you need to set the type so it causes some pain

anyways i've made a picture that might help you find the settings
http://img341.imageshack.us/my.php?imag ... voltr8.jpg

and you don't need to set any events or similar :o

edit:
you need to do steps 1-4 only once, and then add and edit as many myPhysicVolumes as you want :o

Posted: 31-01-2008 20:07
by BunnyS
ty very very much :D

got it working <3