This feature is a replacement for +GHOST +THRUGHOST in situations that are complex and need more than +GHOST and +THRUGHOST, but where actors don't change their collision rules over time.
CollisionType <string> - actor that goes through actors with group <string>, an actor has only one collision type (set CollisionType "None" to disable)
CollisionGroup <string> - actor that allows other actors with type <string> to go through itself, an actor can have multiple collision groups (use ClearCollisionGroups to clear them)
Examples:
Code: Select all
Actor MegaRocket : Rocket replaces Rocket // MegaRocket goes through MegaDoomImp and MegaHellknight
{
CollisionType "SuperMissile"
}
Actor MegaDoomImp : DoomImp replaces DoomImp
{
CollisionGroup "SuperMissile"
}
Actor MegaHellknight : Hellknight replaces Hellknight
{
CollisionGroup "SuperMissile"
}
Actor NotMegaHellKnight : MegaHellknight // MegaRocket can't go through this monster
{
ClearCollisionGroups
}
Actor NotMegaRocket : MegaRocket // this actor can't go through anyone
{
CollisionType "None"
}
// Tip: Projectiles have -SOLID by default, everything can go through rockets.
Fell the difference between:
Code: Select all
// OmegaDoomImp can't go through MegaDoomImp, but MegaDoomImp goes through OmegaDoomImp
Actor OmegaDoomImp : DoomImp
{
CollisionGroup "Imps"
}
Actor MegaDoomImp : DoomImp
{
CollisionType "Imps"
}
// ==================================
// OmegaDoomImp goes through MegaDoomImp, but MegaDoomImp can't go through OmegaDoomImp
Actor OmegaDoomImp : DoomImp
{
CollisionType "Imps"
}
Actor MegaDoomImp : DoomImp
{
CollisionGroup "Imps"
}
Unlike flags, collision variables can't be changed in states, but you can use many collision types and groups in the same actor type.
This feature will be very useful in situations like this:
Code: Select all
Actor RedTeamStructure : Structure
{
CollisionGroup "RedTeam"
}
Actor BlueTeamStructure : Structure
{
CollisionGroup "BlueTeam"
}
Actor BlueTeamClass1 : PlayerPawn
{
CollisionType "BlueTeam"
}
Actor BlueTeamClass2 : PlayerPawn
{
CollisionType "BlueTeam"
}
Actor RedTeamClass1 : PlayerPawn
{
CollisionType "RedTeam"
}
Actor RedTeamClass2 : PlayerPawn
{
CollisionType "RedTeam"
}
https://github.com/rheit/zdoom/pull/469
This feature is a replacement for +GHOST +THRUGHOST in situations that are complex and need more than +GHOST and +THRUGHOST, but where actors don't change their collision rules over time.
CollisionType <string> - actor that goes through actors with group <string>, an actor has only one collision type (set CollisionType "None" to disable)
CollisionGroup <string> - actor that allows other actors with type <string> to go through itself, an actor can have multiple collision groups (use ClearCollisionGroups to clear them)
[b]Examples:[/b]
[code]
Actor MegaRocket : Rocket replaces Rocket // MegaRocket goes through MegaDoomImp and MegaHellknight
{
CollisionType "SuperMissile"
}
Actor MegaDoomImp : DoomImp replaces DoomImp
{
CollisionGroup "SuperMissile"
}
Actor MegaHellknight : Hellknight replaces Hellknight
{
CollisionGroup "SuperMissile"
}
Actor NotMegaHellKnight : MegaHellknight // MegaRocket can't go through this monster
{
ClearCollisionGroups
}
Actor NotMegaRocket : MegaRocket // this actor can't go through anyone
{
CollisionType "None"
}
// Tip: Projectiles have -SOLID by default, everything can go through rockets.
[/code]
[b]Fell the difference between:[/b]
[code]
// OmegaDoomImp can't go through MegaDoomImp, but MegaDoomImp goes through OmegaDoomImp
Actor OmegaDoomImp : DoomImp
{
CollisionGroup "Imps"
}
Actor MegaDoomImp : DoomImp
{
CollisionType "Imps"
}
// ==================================
// OmegaDoomImp goes through MegaDoomImp, but MegaDoomImp can't go through OmegaDoomImp
Actor OmegaDoomImp : DoomImp
{
CollisionType "Imps"
}
Actor MegaDoomImp : DoomImp
{
CollisionGroup "Imps"
}
[/code]
Unlike flags, collision variables can't be changed in states, but you can use many collision types and groups in the same actor type.
This feature will be very useful in situations like this:
[code]
Actor RedTeamStructure : Structure
{
CollisionGroup "RedTeam"
}
Actor BlueTeamStructure : Structure
{
CollisionGroup "BlueTeam"
}
Actor BlueTeamClass1 : PlayerPawn
{
CollisionType "BlueTeam"
}
Actor BlueTeamClass2 : PlayerPawn
{
CollisionType "BlueTeam"
}
Actor RedTeamClass1 : PlayerPawn
{
CollisionType "RedTeam"
}
Actor RedTeamClass2 : PlayerPawn
{
CollisionType "RedTeam"
}
[/code]
https://github.com/rheit/zdoom/pull/469