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 1 2017

omard2000 had the most liked content!

Community Reputation

122 Excellent

About omard2000

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

Profile Information

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

Recent Profile Visitors

1,710 profile views
  1. Theorem

    Looks really good!
  2. My Level Design Is For Sure Improving. Feedback Needed

    Looking good!
  3. Lonely World

    Very nice!
  4. Photon Damage

    @OneManArmy - Thank you so much! It worked perfectly!
  5. Photon Damage

    @OneManArmy - I'm confused now. Because two players take the damage (sometimes)? Here is my code: FPS_Shoot.cs public void Fire (){ RaycastHit hit; Ray ray = fpsCam.ScreenPointToRay (new Vector3 (Screen.width / 2, Screen.height / 2, 0)); if (Physics.Raycast (ray, out hit, range)) { if (hit.transform.tag == "Player") { if (this.gameObject.GetComponent <PhotonView> ().isMine) { hit.transform.GetComponent<PhotonView> ().RPC ("applyDamage", PhotonTargets.All, damage); Debug.Log (hit.transform.name); } } GameObject particleClone; // particleClone = PhotonNetwork.Instantiate (hitPar.name, hit.point, Quaternion.LookRotation (hit.normal), 0) as GameObject; // Destroy (particleClone, 2); } } FPS_Controller.cs [PunRPC] public void applyDamage(int dmg){ health = health -= dmg; } I don't know where I wen't wrong.
  6. Photon Damage

    Me neither Thanks OMA! I'll take a look at this rn!
  7. Photon Damage

    @OneManArmy - thanks for your reply! So I would use if (photonView.isMine) {the shooting code here}? I don't get how I would apply the damage to only one player?
  8. Photon Damage

    Hey guys, I was wondering how to add damage to only one player. I did call an RPC, but the RPC is called by every player in the room which leads to more damage being applied. So my question is how can I only apply the damage once? Thanks, Omard2000
  9. Photon Controlling Wrong Player

    Never mind, I found a solution. Thanks.
  10. Photon Controlling Wrong Player

    using System.Collections; using System.Collections.Generic; using UnityEngine; public class FPS_Controller : MonoBehaviour { public float speed = 6.0F; public float jumpSpeed = 8.0F; public float gravity = 20.0F; private Vector3 moveDirection = Vector3.zero; private Vector3 targetPosition; private Quaternion targetRotation; private PhotonView photonView; void Awake () { photonView = this.gameObject.GetComponent <PhotonView> (); PhotonNetwork.sendRate = 60; PhotonNetwork.sendRateOnSerialize = 30; } // Update is called once per frame void Update () { if (photonView.isMine) { MovePlayer (); } else { SmoothMove (); } } private void OnPhotonSerializeView (PhotonStream stream, PhotonMessageInfo info) { if (stream.isWriting) { stream.SendNext (transform.position); stream.SendNext (transform.rotation); } else { targetPosition = (Vector3)stream.ReceiveNext (); targetRotation = (Quaternion)stream.ReceiveNext (); } } private void SmoothMove () { transform.position = Vector3.Lerp (transform.position, targetPosition, 0.25f); transform.rotation = Quaternion.RotateTowards (transform.rotation, targetRotation, 500 * Time.deltaTime); } private void MovePlayer () { CharacterController controller = GetComponent<CharacterController>(); if (controller.isGrounded) { moveDirection = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical")); moveDirection = transform.TransformDirection(moveDirection); moveDirection *= speed; if (Input.GetButton("Jump")) moveDirection.y = jumpSpeed; } moveDirection.y -= gravity * Time.deltaTime; controller.Move(moveDirection * Time.deltaTime); } } Hey guys, whenever I make a build and play between two clients I am always controlling the opposite client, I don't know why though. Thanks, Omard2000
  11. PayPal Transactions?

    Sorry for another thread, I was wondering how to submit a PayPal payment through Unity? Would I have to use the WWW class? HTTP Requests? I want the user to be able to confirm the payment in game too. What is the best way to do this?
  12. Money Transactions (iOS)

  13. Money Transactions (iOS)

    There is a gambling service that is provided by Unity that offers a method of sending and receiving money. We would like to do this except that we are not gambling, it is the winning team (according to skill, not luck) that wins the $. Have you ever heard about this before?
  14. Money Transactions (iOS)

    Hey guys, Does anyone here know how to handle money transactions. The concept is that before the match starts both teams put in $1, and lets say that there are two teams. So the total money of both the teams would be $2. I want the winning team to get the $2. How would I do this using real money? I'd prefer not to use iTunes Credit. Any ideas? Thanks, Omard2000
  15. Photon Matchmaking Script

    It's not really that hard, and you can find them all over Google too if you searched for them. PhotonNetwork.CreateRoom (roomName); that's the basics to create a room. If you want to be able to set the room properties then you have to use RoomOptions. RoomOptions roomOptions = new RoomOptions (); roomOptions.MaxPlayers = (byte) maxPlayers; // Max Players roomOptions.isVisible = true; // Is visible (Server Browser) roomOptions.isOpen = true; // Players can join PhotonNetwork.CreateRoom (serverNameInput.text, roomOptions, TypedLobby.Default); // Create room You can also set Custom Properties for the room if you want to add a map name etc...