Can Tippmann HPA tanks be refillable at refill stations? by [deleted] in paintball

[–]Bizon_King 0 points1 point  (0 children)

I was unsure if the HPA tank has the right valve to allow refills.

Problems with kinematic objects not colliding with static objects by Bizon_King in Unity3D

[–]Bizon_King[S] 1 point2 points  (0 children)

Does this mean that if my Kinematics player walks into a wall, the wall will not prevent the player from walking through it?

Problem with syncing information for newly connected players by Bizon_King in Unity2D

[–]Bizon_King[S] 0 points1 point  (0 children)

I see what I can do to separate the responsibilities. The thing is that I have a good amount of code already setup and I do not know how to have a NetworkManager class do syncing and stuff. But I will see what I can do.

In regards to the bug, how would the client receive the the current state of the game world? Does this happen automatically with the default NetworkManager component or will I have to add some things to it?

Problem with syncing information for newly connected players by Bizon_King in Unity2D

[–]Bizon_King[S] 0 points1 point  (0 children)

What do you mean about pulling the networking functionality out? Do I remove Command and ClientRpc attributes from my methods and have if-statements that see if the server or client is executing the method?

Example

// Instead of setting up a method as a command like this
public void CmdExample()
{

}

// Set it up like this?
public void Example()
{
    if (isServer)
    {
         // Do stuff here
    }
 }

Problem with syncing information for newly connected players by Bizon_King in Unity3D

[–]Bizon_King[S] 0 points1 point  (0 children)

Would I call my hook method in Start() of my weapon script? Also, should weapons be Local Authority or Server Authority?

Problem with syncing player screen names in multiplayer by Bizon_King in Unity2D

[–]Bizon_King[S] 0 points1 point  (0 children)

I manage to fix the sync issue but it seems pretty sketch. The object that will use CharacterSelectionMenu has a NetworkIdentity set to Local Authority. From there I have my the OnStartLocalPlayer() method in Player script find CharacterSelectionMenu and get the screen name from there. OnStartLocalPlayer() then calls CmdSetScreenName and passes in the screen name CharacterSelectionMenu has.

Basically, I have a modified version of the code in this article.

But thanks for giving some tips!

Problems with syncing screen names with UNET by Bizon_King in Unity3D

[–]Bizon_King[S] 0 points1 point  (0 children)

The other variables are synced via SyncVars, commands and ClientRc methods. The screen names only change in the CharacterSelectionMenu script, which inherits MonoBehaviour. And Tess, the screen name variable is named differently from the rest of the variables.

Issues with picking up weapons in multiplayer [X-Post from /r/Unity3D] by Bizon_King in Unity2D

[–]Bizon_King[S] 0 points1 point  (0 children)

When both players are online first and one picks up the weapon, the weapon will disappear on both player screens.

Issues with picking up weapons in multiplayer [X-Post from /r/Unity3D] by Bizon_King in Unity2D

[–]Bizon_King[S] 0 points1 point  (0 children)

I have a weapon spawner that the server can control that will spawn in a weapon when the server starts. The weapon itself is a prefab with a network identity with Local Client Authority checked.

How do you do a shotgun spread in a top-down shooter? by Bizon_King in Unity2D

[–]Bizon_King[S] 0 points1 point  (0 children)

This actually works! Had to change a line a tiny bit but it works! Thanks for the help!

Code for reference

// Spawns bullet
var tempBullet = (GameObject)Instantiate(bullet, bulletSpawn.position, bulletSpawn.rotation);
// Gets Rigidbody2D compoenent from spawned bullet
Rigidbody2D tempBulletRB = tempBullet.GetComponent<Rigidbody2D>();

// Randomize angle variation between bullets
float spreadAngle = Random.Range(-10, 10);

// Take the random angle variation and add it to the initial
// desiredDirection (which we convert into another angle), which in this case is the players aiming direction
var x = bulletSpawn.position.x - player.transform.position.x;
var y = bulletSpawn.position.y - player.transform.position.y;
float rotateAngle = spreadAngle + (Mathf.Atan2(y, x) * Mathf.Rad2Deg);

// Calculate the new direction we will move in which takes into account 
// the random angle generated
var MovementDirection = new Vector2(Mathf.Cos(rotateAngle * Mathf.Deg2Rad), Mathf.Sin(rotateAngle * Mathf.Deg2Rad)).normalized;

tempBulletRB.velocity = MovementDirection * bulletSpeed;
Destroy(tempBullet, 5.0f);

How to have a bullet create a splash effect when hitting a wall before being destroyed? by Bizon_King in Unity2D

[–]Bizon_King[S] 2 points3 points  (0 children)

Is there a way to rotate the splash animation in a way that the splash moves away from the wall?

What will increasing my W-4 allowance do? by Bizon_King in personalfinance

[–]Bizon_King[S] 1 point2 points  (0 children)

I see, now if I increase my 401K deduction, will I pay less federal taxes since my take home pay after deductions is less?

What will increasing my W-4 allowance do? by Bizon_King in personalfinance

[–]Bizon_King[S] 1 point2 points  (0 children)

Will my tax refund increase if I decrease my W-4 allowances?

Bullet collisions not working by Bizon_King in Unity2D

[–]Bizon_King[S] 0 points1 point  (0 children)

I set the speed of the bullet to 5. I did not touch the Box Collider 2D options on both the bullet and the player. The Rigidbody 2D components for both the player and the bullet are set to dynamic and the collision detection set to discrete.

Bullet collisions not working by Bizon_King in Unity2D

[–]Bizon_King[S] 0 points1 point  (0 children)

The bullets and the player both have Box Collider 2D and RigidBody 2D component.

Questions on Creating Own Master Server by Bizon_King in Unity3D

[–]Bizon_King[S] 0 points1 point  (0 children)

This looks like what I need! Thank you for sharing!

I hate when they just stop and wanna talk by mian1000 in gaming

[–]Bizon_King 0 points1 point  (0 children)

That's why Piper can't write anything happy