Per player collision toggle dll [will pay $25]

Author Topic: Per player collision toggle dll [will pay $25]  (Read 2172 times)

Hi, I'd like a dll that would be similar to the PlayerCollisionToggle one but would instead allow specific player collision. This could be set with something like Player::setCollision(bool).

Would have to work with MoveHandler and SelectiveGhosting.

I'll pay with PayPal, Steam game, order something to your house, whatever.

What is supposed to happen if a player with it off runs into a player with it on? Or the other way around?

If a player who has their collision enabled runs into someone who doesn't, they go through. When someone has their collision disabled they can't go through people with it enabled.

If it's easier I'd be fine with a function like how miniGameCanDamage() works, returning if they should collide.

Ok, I though of a pretty simple solution to achieve that. Can try to implement it tomorrow.

what about projectiles and raycasts

what about projectiles and raycasts

You'll be able to set whether a raycast/search is meant to hit normal players, hidden players, or both. Same goes for projectiles, though that can only be a global setting that applies to all projectiles once set.

I've uploaded a new version of the player collision dll here: https://github.com/Zeblote/PlayerCollisionToggle

The commands in "Disabling collision for specific players" will do what you need by default, but can also be modified for different purposes
You'll probably want to put it in a ts wrapper function to make it shorter to use

It would be nice if something like this could be added in vehicles, like let's say in a race you can disable collision between vehicles.

It would be nice if something like this could be added in vehicles, like let's say in a race you can disable collision between vehicles.

https://github.com/Zeblote/PlayerCollisionToggle#usage

Amazing, thanks so much.

https://github.com/Zeblote/PlayerCollisionToggle#usage
Neat, so I imagine you could do something like...
Code: [Select]
function onPlayerProcessTick(%player, %move)
{
    if(%player.getType() & $TypeMasks::PlayerObjectTypeHidden)
    {
        $Physics::PlayerMoveMask &= ~$TypeMasks::PlayerObjectTypeHidden;
        $Physics::PlayerContactMaskServer &= ~$TypeMasks::PlayerObjectTypeHidden;

        $Physics::PlayerMoveMask |= $TypeMasks::PlayerObjectTypeNormal;
        $Physics::PlayerContactMaskServer |= $TypeMasks::PlayerObjectTypeNormal;
    }
    else
    {       
        $Physics::PlayerMoveMask &= ~$TypeMasks::PlayerObjectTypeNormal;
        $Physics::PlayerContactMaskServer &= ~$TypeMasks::PlayerObjectTypeNormal;

        $Physics::PlayerMoveMask |= $TypeMasks::PlayerObjectTypeHidden;
        $Physics::PlayerContactMaskServer |= $TypeMasks::PlayerObjectTypeHidden;
    }
}
To make it so players don't collide with players on the same layer, but collide with players on the other layer? Effectively being able to create a "move through your own team but not the enemy team" system?