New Physics Volume Question

Look for maps, show your maps...

Moderators: Jay2k1, DavidM, The_One

Locked
BunnyS
Senior Member
Posts: 1943
Joined: 02-06-2005 13:46

New Physics Volume Question

Post by BunnyS »

How can I set a 'killing' physics volume to only kill/effect one team ?

:)
Goldeneye
Senior Member
Posts: 171
Joined: 09-03-2003 00:00

Post 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)
BunnyS
Senior Member
Posts: 1943
Joined: 02-06-2005 13:46

Post 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"
Last edited by BunnyS on 31-01-2008 08:46, edited 1 time in total.
Goldeneye
Senior Member
Posts: 171
Joined: 09-03-2003 00:00

Post 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
BunnyS
Senior Member
Posts: 1943
Joined: 02-06-2005 13:46

Post by BunnyS »

ty very very much :D

got it working <3
Locked