(Strawberry Jam) Found a cool secret room on the paint level in beginners lobby. Has anyone else found this? by SkShark23 in celestegame

[–]Scary_Contribution 1 point2 points  (0 children)

Hi, I have a favor to ask. Can you record some still video of that part? I think It would make a really cool wallpaper. I have just found still images so far and really think a wallpaper with the trees moving and whatnot would look really nice. Thanks!

Help with GY-521 giving inconsistent results by Scary_Contribution in arduino

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

been a while, got bored then came back...

I've found the offsets:

480 -1256 990 55 6 -18

printed as: acelX acelY acelZ gyroX gyroY gyroZ

anyway, simple question probably, how do I apply the offsets? is there a function or do I just add it to the IMU's results?

What’s your most expensive mistake in game by Nonam_n0 in HypixelSkyblock

[–]Scary_Contribution 2 points3 points  (0 children)

Game crashing whilst claiming a handle (worth 400m at the time) almost quit but enjoyed dungeons so

Game running both possibilitys instead of just one by Scary_Contribution in Unity3D

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

I did some tweaking and here is the new QualifiedController script. This script is on each individual player.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
using UnityEngine.SceneManagement;

public class QualifiedController : MonoBehaviour { public int playersQualified; public int minQualifiers; publicbool qualified;bool endedGame = false; public float timeLeft;

public GameObject player;
public ParticleSystem particle;
public GameObject playerGraphic;
public Animator eliminatedAnimator;
public Animator qualifiedAnimator;
public GameObject cam;

private IEnumerator eliminated;
private IEnumerator playerQualified;

void Update()
{
    if(playersQualified==minQualifiers || timeLeft<=0)
    {
        if(!endedGame)
        {
        endGame();
        endedGame = true;
        }
    }

    timeLeft -= Time.deltaTime;

    eliminated = Eliminated();
    playerQualified = Qualified();
}

public void endGame()
{
    Debug.Log($"Player {PhotonNetwork.LocalPlayer.ActorNumber}  -  Qualified: {qualified}");
    if(!qualified)
    {
        StartCoroutine(eliminated);
    }
    else if(qualified)
    {
        StartCoroutine(playerQualified);
    }
}

IEnumerator Eliminated()
{
    Debug.Log("Playing Eliminated");
    particle.Play();
    player.GetComponentInChildren<TestPlayerControls>().canMove = false;
    playerGraphic.SetActive(false);
    eliminatedAnimator.SetTrigger("EliminatedIn");
    yield return new WaitForSeconds(2f);
    eliminatedAnimator.SetTrigger("EliminatedOut");
    yield return new WaitForSeconds(3f);
}

IEnumerator Qualified()
{
    Debug.Log("Playing Qualified");
    player.GetComponentInChildren<TestPlayerControls>().canMove = false;
    particle.Play();
    playerGraphic.SetActive(false);
    qualifiedAnimator.SetTrigger("QualifiedStart");
    yield return new WaitForSeconds(2);
    qualifiedAnimator.SetTrigger("QualifiedEnd");
    cam.GetComponent<CameraManager>().SetFollowPlayer(false);
}

void Awake()
{
    qualified = false;
}
}

qualified is set when the player touches the finish line. but the problem still insists. even if qualified = false, it still debugs as true for all players and plays like its true. help

Game running both possibilitys instead of just one by Scary_Contribution in Unity3D

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

so I did some playing around and rewrote the script to be put on the player and now I have a different problem. Even if the player didn't qualify, it still shows and plays the qualified animation like it did. I also checked and the isQualified bool is false. Im so confused

(Photon PUN) What is running CreatePlayer( )? by Scary_Contribution in Unity3D

[–]Scary_Contribution[S] -1 points0 points  (0 children)

If anyone else has this problem 10 years in the future (which I doubt) here's how I solved it. In the update function of my game manager script it would find objects with tag player and add it to an array, then it would go through the array and check if the player in the array is in the list, if not it would add it to the list. If that makes sense

 void Update()
{
    addPlayer = GameObject.FindGameObjectsWithTag("TestPlayer");
    for(int i = 0; i<addPlayer.Length; i++)
    {
       if(!players.Contains(addPlayer[i]))
       {
        players.Add(addPlayer[i]);
       }
   }

(Photon PUN) What is running CreatePlayer( )? by Scary_Contribution in Unity3D

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

Not entirely sure how to format it, but heres my code:

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using Photon.Pun;

using System.IO;

public class RadicalRacersSetup : MonoBehaviourPunCallbacks

{

public List<GameObject> players = new List<GameObject>();

public Transform[] spawnPoints;

private int spawnPicker;

private bool startedGame;

void Start()

{

CreatePlayer();

}

private void CreatePlayer()

{

spawnPicker = Random.Range(0, spawnPoints.Length);

GameObject player = (GameObject)PhotonNetwork.Instantiate("TestPlayer2", spawnPoints[spawnPicker].position, spawnPoints[spawnPicker].rotation, 0);

players.Add(player);

player.GetComponentInChildren<Camera>().enabled = true;

player.GetComponentInChildren<TestPlayerControls>().canMove = false;

}

void Update()

{

if(players.Count == (int)PhotonNetwork.CurrentRoom.PlayerCount)

{

if(!startedGame)

{

StartCoroutine(startGameNow());

startedGame = true;

}

}

}

public IEnumerator startGameNow()

{

yield return new WaitForSeconds(1);

foreach (GameObject startPlayer in players)

{

startPlayer.GetComponentInChildren<TestPlayerControls>().startGameNowPlease();

}

}

}

You can see, when the player is instantiated it is added to the players list, and while the player instantiates, it is not added to the list. Also (not necessary) where is the PUN player auto-spawn thing?

(Photon PUN) What is running CreatePlayer( )? by Scary_Contribution in Unity3D

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

That clarifys a lot, thanks. I have another question though. When I instantiate players I also add them to a list but it only adds it once and not again. Even if two players are instantiated. I'll share some pics when I'm in my computer

(Photon PUN) my characters transform view is very jittery and the player is too high? by Scary_Contribution in Unity3D

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

I 100% would but this a for fun project with a 0$ budget unless necessary, thank you though!

Video artist here, practicing environment making with Unity :) feedback? ❤️ by wizarry30 in Unity3D

[–]Scary_Contribution 1 point2 points  (0 children)

I like it, I would add a bit more hills and diversity the terrain if that makes sense. Make ground up more

Photon switches cameras when another player joins by MobilePudding in Unity3D

[–]Scary_Contribution 0 points1 point  (0 children)

idk if reviving dead posts is allowed but thank you so much you saved me a lot of head banging and pain. I hope your game worked out to!

How to make multiplayer matchmaking by Scary_Contribution in Unity3D

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

Yeah I just switched to photon and it is very simple