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.


Premium Member
  • Content Count

  • Joined

  • Last visited

  • Days Won


omard2000 last won the day on July 10 2018

omard2000 had the most liked content!

Community Reputation

125 Excellent

About omard2000

  • Rank
    PHP, C#, Unity, HTML, CSS
  • Birthday 08/20/2000

Profile Information

  • Gender
    Not Telling
  • Location:
    United States
  • Interests
    - PHP and C#

Recent Profile Visitors

2,121 profile views
  1. I skimmed through the video and it does cover a decent amount. However, I would not recommend watching a 4 hour video in hope of mastering any programming language. You also did not mention if you have previous knowledge of other languages or C#. Personally, what I would do, is I would cover each topic in depth. For example, if you're learning about arrays I would look up a YouTube tutorial about arrays and find a video that really goes into depth and gives you fully explained code. Make sure to check out the documentation as well if you are having a hard time understanding a concept. I would consider this video somewhat of a starting point maybe? It really all comes down to what you are expecting to learn.
  2. Hi everyone, I am trying to retrieve an image (as a texture) from my website http://www.coldops.rf.gd/1.png through Unity's WWW stream. However, whenever I try downloading it through the WWW stream it displays a big red question mark instead. What is weird is that I have tried it with other images (from different websites) and it seems to be working just fine. Does anyone have any ideas what could be the issue here? For example, this website's image works just fine: http://gameassets.net/GameAssetsLogo.png Here is my code: using System.Collections; using System.Collections.Generic; using UnityEngine.UI; using UnityEngine; public class News_Manager : MonoBehaviour { public RawImage image; IEnumerator Start () { WWW www = new WWW ("http://www.coldops.rf.gd/1.png"); yield return www; image.texture = www.texture; } } Thanks!
  3. Yeah, I just realized that too. In the OnDisable function it should be removecallbacktarget instead, but I don't think that's the issue. I ended up re-writing the script because I couldn't find where I went wrong lol. Hmm... but how would the user control the player and how would I send RPC calls? Shouldn't there only be one player per user?
  4. @OcularCash I checked and there is only 1 object in the scene in both edit and play mode with the script attached to it. Do you think it could be the OnEnable or OnDisable functions?
  5. @OcularCash Yeah it is being logged twice in the console. I can't figure out why though.
  6. Hi Everyone, I have a really quick question. The script is working except it instantiates the player twice and I cannot figure out why. Here is the outline of the script: 1) Waits until enough players join 2) Once enough players have joined a countdown from 5 seconds starts 3) All players are joined into a new multiplayer scene I can't figure out why double of every player are being instantiated. Thanks! Here is my script: using Photon.Pun; using Photon.Realtime; using System.Collections; using System.Collections.Generic; using UnityEngine.SceneManagement; using UnityEngine; using System.IO; public class PhotonRoom : MonoBehaviourPunCallbacks, IInRoomCallbacks { // Player settings private PhotonView PV; public Player [] players; public int playersInRoom; // Game settings private bool isGameLoaded = false; private bool doneLoading = false; private bool readyToStart = false; private int currentScene = 0; private int multiplayerScene = 1; // Count down private float countFrom = 6; void Awake () { DontDestroyOnLoad (this.gameObject); } private void Start () { PV = GetComponent<PhotonView> (); } public override void OnEnable () { base.OnEnable (); PhotonNetwork.AddCallbackTarget (this); SceneManager.sceneLoaded += OnSceneFinishedLoading; } public override void OnDisable () { base.OnDisable (); PhotonNetwork.AddCallbackTarget (this); SceneManager.sceneLoaded -= OnSceneFinishedLoading; } private void Update () { if (!isGameLoaded) { if (readyToStart) { Debug.Log ("Hit1"); countFrom -= Time.deltaTime; Debug.Log ("Time left: " + countFrom); } } if (countFrom <= 0) { if (doneLoading == false) { StartGame (); doneLoading = true; } } } public override void OnJoinedRoom () { base.OnJoinedRoom (); players = PhotonNetwork.PlayerList; playersInRoom = players.Length; if (playersInRoom % 2 == 0) { readyToStart = true; } if (playersInRoom == PhotonNetwork.CurrentRoom.MaxPlayers) { if (!PhotonNetwork.IsMasterClient) return; PhotonNetwork.CurrentRoom.IsOpen = false; } } public override void OnPlayerEnteredRoom (Player newPlayer) { base.OnPlayerEnteredRoom (newPlayer); players = PhotonNetwork.PlayerList; playersInRoom++; if (playersInRoom % 2 == 0) { readyToStart = true; } if (playersInRoom >= PhotonNetwork.CurrentRoom.MaxPlayers) { if (!PhotonNetwork.IsMasterClient) return; PhotonNetwork.CurrentRoom.IsOpen = false; } } void StartGame () { isGameLoaded = true; if (!PhotonNetwork.IsMasterClient) return; PhotonNetwork.CurrentRoom.IsOpen = false; PhotonNetwork.LoadLevel(multiplayerScene); } void OnSceneFinishedLoading (Scene scene, LoadSceneMode mode) { Debug.Log ("This was called"); currentScene = scene.buildIndex; if (currentScene == multiplayerScene) { isGameLoaded = true; PV.RPC ("RPC_LoadedGameScene", RpcTarget.MasterClient); } } [PunRPC] private void RPC_LoadedGameScene () { Debug.Log ("Players in Room: " + playersInRoom); Debug.Log ("PlayerList.Length: " + PhotonNetwork.PlayerList.Length); if (playersInRoom == PhotonNetwork.PlayerList.Length) { PV.RPC ("RPC_CreatePlayer", RpcTarget.All); } } [PunRPC] private void RPC_CreatePlayer () { PhotonNetwork.Instantiate (Path.Combine ("PhotonPrefabs", "PhotonNetworkPlayer"), transform.position, Quaternion.identity, 0); } }
  7. My pleasure! If you need any other help in the future with PHP/HTML/CSS just let me know :). Gotcha.
  8. There are a few things wrong with your script. 1) There is no need to select a database in a separate variable. This should be done while initiating the connection to the server. I have provided an example below. Make sure that you remove the if statement that includes the '$db_select' variable. The if statement basically would exit the script if a database was found and the rest of the script would not run. $con = mysqli_connect("localhost","my_user","my_password","my_db"); Now that you have your connection initiated you can move on. 2) While creating a query you also have to include the connection. Here is an example. mysqli_query($con,"SELECT * FROM Persons"); 3) When you are inserting the user information into the database, you are inserting the $password variable which is not hashed. Make sure to replace $password with $pass to insert the hashed password into the database. Security Advice This script is not secure at all. Use a more advanced encryption method than MD5. Try using BCRYPT. Also, use prepared statements. This script is not safe at all.
  9. Looks amazing! Keep up the great work!
  10. omard2000

    Our Start

    @BTEK - I think @TalkZer is asking how did you start using Unity or Game Development. Correct me if I'm wrong tho.
  11. Looking good! Loving the muzzle flash. Maybe try changing the fire sound effect, it gets a bit annoying.
  12. Oh, alright. My bad, I misunderstood. But still, I would not work for someone if there is not a guaranteed payment, but that's just me.
  • Create New...