How can I set a 'killing' physics volume to only kill/effect one team ?
New Physics Volume Question
Moderators: Jay2k1, DavidM, The_One
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:
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)
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)
"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
I tried
Event = CausePainTo
Exclude tag = 0
or I also tried "DB_Pawn0"
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
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.
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
edit:
you need to do steps 1-4 only once, and then add and edit as many myPhysicVolumes as you want
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
edit:
you need to do steps 1-4 only once, and then add and edit as many myPhysicVolumes as you want