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.

Search the Community

Showing results for tags 'block'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GENERAL
    • Introduce yourself
    • Discussions
    • Showcase
    • Need help?
    • Seeking team members?
    • Offtopic
  • RESOURCES
    • unity3D | Example Projects
    • unity3D | Scripts
    • unity3D | Shaders
    • unity3D | Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
  • FREE FPS PROJECT
    • FPSKit Download
    • FPSKit Modifications/Tutorials
    • FPSKit WIP/Showcase
    • Discussions / Bug reports
  • SELL | REQUEST
    • Sell
    • Request
  • Busy People's Introductions
  • Mars' Modular Multiplayer Photon FPS Kit's Topics
  • Mars' Modular Multiplayer Photon FPS Kit's Reviews
  • Photon's Photon General
  • Photon's Showcase
  • Mars' Modular Multiplayer Photon FPS Kit's Updates

Categories

  • Free Projects
  • Free Assets
  • Game Demos
  • Photon's Files

Calendars

  • Community Calendar

Facebook URL


Twitter URL


IndieGoGo URL


Kickstarter URL


IndieDB URL


GreenLight URL


Location:


Interests

Found 2 results

  1. WIP Voxel FPS game

    Started couple days ago a little project. Its a voxel/block FPS base game. Need some help and feedback with what to fix, add, and if anyone is interested to company me threw the journey of creating the game Some YouTube support would be very appreciated! Here are the video links, hope you like the project : https://www.youtube.com/channel/UCbvX4MAq0KmdXpkTKANBpxQ
  2. Hey guys I have a Script that creates a cube on pressing left mouse button and deleting cubes on pressing right mouse button but I also want to play sound on placing or destroying cubes like a placing sound for placing a block and a destroying sound for destroying a block. If somebody can help me it would be very nice thx! Heres my Script!: var Block : Transform; var textureIndicator : GUITexture; private var textures = new Array(); private var selectedTexture : int; function Start(){ Screen.lockCursor = true; textures = Resources.LoadAll("Textures", Texture); } function Update () { Screen.lockCursor = true; if(Input.GetKeyDown(KeyCode.E) && selectedTexture < textures.length-1){ selectedTexture++; } else if(Input.GetKeyDown(KeyCode.Q) && selectedTexture > 0){ selectedTexture--; } textureIndicator.texture = textures[selectedTexture]; if(Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1)){ var ray : Ray = Camera.main.ScreenPointToRay(Input.mousePosition); var hit : RaycastHit; if(Physics.Raycast(ray,hit, 50) && (hit.transform.tag == "Block" || hit.transform.tag == "Terrain")) { if(Input.GetMouseButtonDown(1)){ var buildPos : Vector3; if(hit.transform.tag == "Block"){ buildPos = hit.collider.transform.position+hit.normal.normalized; } else{ buildPos = Vector3(Mathf.Round(hit.point.x), Mathf.Ceil(hit.point.y), Mathf.Round(hit.point.z)); } var newBlock : Transform = Instantiate(Block, buildPos, Quaternion.identity); newBlock.renderer.material.mainTexture = textures[selectedTexture]; newBlock.tag = "Block"; } else if(hit.transform.tag == "Block"){ Destroy(hit.transform.gameObject); } } } }
×