Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

MarcoGuy1

Member
  • Content count

    64
  • Joined

  • Last visited

Community Reputation

6 Neutral

About MarcoGuy1

  • Rank
    Member
  • Birthday 12/18/1995

Profile Information

  • Gender
    Male
  • Location:
    Florida
  1. Timer works, but I cannot sync it up to the photon network using UnityEngine; using UnityEngine.UI; using Hashtable = ExitGames.Client.Photon.Hashtable; public class HUD : MonoBehaviour { public Text TextComponent; private bool hasStartTime; private int startTime; float minutes = 10; float seconds = 0; float miliseconds = 0; public void Update() { if (!hasStartTime) { return; } if (miliseconds <= 0) { if (seconds <= 0) { minutes--; seconds = 59; } else if (seconds >= 0) { seconds--; } miliseconds = 100; } miliseconds -= Time.deltaTime * 100; //Debug.Log(string.Format("{0}:{1}:{2}", minutes, seconds, (int)miliseconds)); TextComponent.text = string.Format("{0}:{1}", minutes, seconds, (int)miliseconds); } public void OnJoinedRoom() { if (!PhotonNetwork.isMasterClient) { return; } Hashtable ht = new Hashtable(); ht.Add("StartTime", PhotonNetwork.ServerTimestamp); PhotonNetwork.room.SetCustomProperties(ht); } public void OnPhotonCustomRoomPropertiesChanged(Hashtable propertiesThatChanged) { if (propertiesThatChanged.ContainsKey("StartTime")) { hasStartTime = true; startTime = (int)propertiesThatChanged["StartTime"]; } } } Thanks for the help
  2. German HK433 Rifle

    Cool
  3. Crash Script for the third time?!

    Yes Sorry for the late response
  4. Crash Script for the third time?!

    Third times the charm? using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class ItemManager : MonoBehaviour { public Button item1; public Button Clear; public MeshRenderer sight; public MeshRenderer dot; void Start() { sight.enabled = false; dot.enabled = false; { Button btn = item1.GetComponent<Button>(); btn.onClick.AddListener(TaskOnClick); } } void TaskOnClick() { sight.enabled = true; dot.enabled = true; } private void Update() { Button btn = Clear.GetComponent<Button>(); btn.onClick.AddListener(cOnClick); } void cOnClick() { sight.enabled = false; dot.enabled = false; } } I know I know i'm getting a bit annoying now.. please help
  5. EXE Crashes?!

    It did not tell me anything all I have is the error.txt
  6. EXE Crashes?!

    I tried and still
  7. EXE Crashes?!

    Yes, same problem still
  8. EXE Crashes?!

    The EXE Crashes and keeps giving off error logs but it works fine in the editor, please help! If you can help, I would really appreciate it output_log.txt Thanks for taking a look
  9. My 2nd attempt at a M4A1

    Awesome
  10. Spawning Crashes Again?!

    I love you
  11. Spawning Crashes Again?!

    Thank you very very very much You are amazing I can't thank you enough
  12. Spawning Crashes Again?!

    using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class VehicleSpawn : MonoBehaviour { public Button mbutton; public Button button; public GameObject tank; public GameObject buggy; public Button tbutton; public Transform Vspawn; public BlockPlacer bp; public Button cbutton; void Start() { { //start } } public void LateUpdate() { { Button btn = tbutton.GetComponent<Button>(); btn.onClick.AddListener(TaskOnClick); } } void TaskOnClick() { tank = Instantiate(tank, Vspawn.position, Vspawn.rotation) as GameObject; } private void Update() { Button btn = button.GetComponent<Button>(); btn.onClick.AddListener(buggyOnClick); } private void FixedUpdate() { Button btn = mbutton.GetComponent<Button>(); btn.onClick.AddListener(ModB); } void ModB() { bp = GetComponent<BlockPlacer>(); bp.enabled = !bp.enabled; } void buggyOnClick() { buggy = Instantiate(buggy, Vspawn.position, Vspawn.rotation) as GameObject; } } and also even this but this doesn't work... using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class VehicleSpawn : MonoBehaviour { public Button mbutton; public Button button; public GameObject tank; public GameObject buggy; public Button tbutton; public Transform Vspawn; public BlockPlacer bp; public Button cbutton; void Start() { { Button btn = tbutton.GetComponent<Button>(); btn.onClick.AddListener(TaskOnClick); } } void TaskOnClick() { tank = Instantiate(tank, Vspawn.position, Vspawn.rotation) as GameObject; } private void Update() { Button btn = button.GetComponent<Button>(); btn.onClick.AddListener(buggyOnClick); } public void LateUpdate() { Button btn = cbutton.GetComponent<Button>(); btn.onClick.AddListener(ClearMod); } private void FixedUpdate() { Button btn = mbutton.GetComponent<Button>(); btn.onClick.AddListener(ModB); } void ModB() { bp = GetComponent<BlockPlacer>(); bp.enabled = !bp.enabled; } void ClearMod() { bp = GetComponent<BlockPlacer>(); bp.enabled = false; } void buggyOnClick() { buggy = Instantiate(buggy, Vspawn.position, Vspawn.rotation) as GameObject; } }
  13. After A Month Of No Uploads! Hope you guys enjoy it and find it useful P.s. Sorry about the mic being so low...
  14. All of my metadata files are CORRUPTED!!

    I got it working now but when i boot up the editor doesn't show up but instead just runs in the background, any ideas? Thank you very much
  15. All of my metadata files are CORRUPTED!!

    none of the methods in the forum have worked at all Do you have an idea or something please?
×