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 'system'.



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
    • Example Projects
    • Scripts
    • Shaders
    • Unity Tutorials
    • FPS Kit Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
  • SELL | REQUEST
    • Sell
    • Request
  • Mars' Modular Multiplayer Photon FPS Kit's Topics
  • Mars' Modular Multiplayer Photon FPS Kit's Reviews
  • Mars' Modular Multiplayer Photon FPS Kit's Updates
  • Mars' Modular Multiplayer Photon FPS Kit's Tutorials
  • Busy People's Introductions
  • Photon's Tutorials
  • Photon's Photon General
  • Photon's Showcase

Categories

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


YouTube URL


Facebook URL


Twitter URL


IndieGoGo URL


Kickstarter URL


IndieDB URL


GreenLight URL


Location:


Interests

Found 35 results

  1. Hi guys here is my inventory system written in C# and it comes with a simple GUI Skin with extra button skins Inventory script Pick up script Video : Functions Download the GUI.rar for the skin hope you like it GUI.rar
  2. First of all, what is a Cryptocurrency ? Cryptocurrency is a digital currency in which encryption techniques are used to regulate the generation of units of currency and verify the transfer of funds, operating independently of a central bank. To put that in plain words a cryptocurrency (Ex: Bitcoin) is an electronic cash system that uses peer-to-peer network to prevent double-spending. It is 100% and completely decentralized, meaning that it uses no server to send or receive transactions, nor does it have a central authority. What are Cryptocurrencies really? If you take away all the noise around cryptocurrencies and reduce it to a simple definition, you find it to be just limited entries in a database no one can change without fulfilling specific conditions. This may seem ordinary, but, believe it or not: this is exactly how you can define a currency. For example : The money in your bank account: What is it more than entries in a database that can only be changed under specific conditions? You can even take for example physical coins and notes: What are they else than limited entries in a public physical database that can only be changed if you match the condition than you physically own the coins and notes? Money is all about a verified entry in some kind of database of accounts, balances, and transactions. The transaction is known almost immediately by the whole network. But only after a specific amount of time it gets confirmed. Confirmation is a critical concept in cryptocurrencies. You could say that cryptocurrencies are all about confirmation. As long as a transaction is unconfirmed, it is pending and can be forged. When a transaction is confirmed, it is set in stone. It is no longer forgeable, it can‘t be reversed, it is part of an immutable record of historical transactions: of the so-called blockchain. Revolutionary properties ! If you really think about it, Bitcoin, as a decentralized network of peers which keep a consensus about accounts and balances, is more a currency than the numbers you see in your bank account. What are these numbers more than entries in a database – a database which can be changed by people you don‘t see and by rules you don‘t know? I want you guys to post your opinions about cryptocurrencies and how do you think it will impact the world and the global economy in the near and distant future. Credit : BlockGeeks | Wikipedia
  3. hello guys this is A basic inventory system I have done couple months ago hope that will help you . http://adf.ly/10563887/inventorysystem
  4. Hello folks!, I am creating a 2D online game based on a fantasy and adventure world, the logical part between server and client I am going muto well until now, I have done all the treatments of this type and also implemented the database. But an important thing is the inventory system, where I will equip the character and change his look, but in 3D games this is not difficult but I am finding it difficult to do for a 2D game that are treated as sprites .. I'll need support, if anyone knows where I start, suggestion, idea, anything is welcome. For example: When equipping an armor I know I should by the sprite on top of the other, that's fine, I can activate the sprite but how will I use the correct sprites for the animations of the original sprite, for example, when the player moves left it use the armor sprite on the same side and so on for the other positions. How can I do animations of sprites related to attacks when equipping a sword. In fact it is an equipment system for sprites (2D characters as in RPG Maker games). I have seen this system in other engines but I have never been able to reproduce in unity, if anyone can help me, I am grateful. See you.
  5. Hello everyone! I've created another package inside Unity called Vaijk Inventory System. This is an amazingly dynamic and flexible inventory system, it can be adpated to be used in any game you imagine an inventory system fit for. The Vaijk Inventory System comes with a set of utilities that can be used by beginners to get their project going or can be custumized to a whole new level, you determine how the inventory behaves and looks like. Feature Spotlight: - 8 clean and commented scripts; - Basic player system (movement, camera-rotation, health); - Interactable objects; - Item dropping; - Item stacking, crafting, swapping, seperating, usability, etc; - 100% custumizable inventory system; - And many other features... Price for the package: only $7.99 Feel like taking a better look at it? Check it out at Sellfy: https://sellfy.com/p/s23u/ Note: A showcase/tutorial video will be coming out as soon as time is available. Thanks!
  6. Hey guys, here is a project i'm working for a while. It is an Ultimate Inventory System written in C#. Here are all the already implemented features : Inventory supports unlimited number of pick-able items. Inventory supports unlimited number of slots. There are two inventory mods available, the Slot mod and the Weight mod. Using the slot mod you can set up be default or even change at run-time the number of available slots. Using the weight mod you can set the maximum weight (even at run-time) that you can carry, then on each item there is a variable which will set the weight of each item. Supports different sounds for picking up / dropping / using an item or when you are full and you try to pick up items. Customizable key for toggling on/off the inventory. Auto toggle off after an amount of seconds. (You set the amount) You can use preview icon for items or just display the item's name. You can set an icon for empty slots or leave it displaying the text 'Empty'. You can drop items using double left click. You can use items by left clicking on them. You can edit the script 'UI_CustomActivation.cs' on the first void (Follow the comments) and apply your own activation code, to enable it check the 'Custom Activate'. Fully detailed custom inspector with comments to modify your inventory on your needs. Hotkeys "shortcuts" menu which can activate items by clicking them or using the shortcut keys which you can set from the inspector. You can hide empty slots on the hotbar. You can assign all the items for your inventory by dragging and dropping. You can see all the equipped items, and you can set starting items. You can select where the inventory GUI can be by choosing : Top Left , Top Right , Bottom Left , Bottom Right , Center Screen You can select where the hotbars GUI can be by choosing : Top Left , Bottom Left , Top Center, Bottom Center. All GUI positions are supporting different resolutions and aspect ratios. Scrollable gui for unlimited slots. A short video demonstrating some of the above features. Ultimate Inventory System Will Be Available On The Asset Store. Please let me know what you think. Please Check It Here : http://forum.unity3d.com/threads/ultimate-inventory-system-c.255768/
  7. Hi everyone, I'm wanted to make a FPS survival game which had: - Crafting system. - Melee weapons. - Bow and arrow. Note: All i need just crafting melee and using it, as well as bow and arrow. p/s: i can design 2D textures for GUI and UI for any requests. Cheers
  8. This is a very inspector-configurable spawn system, which is executed in waves. Reduces additional programming to minimum if you are happy with features it comes with. Everything is randomly chosen and randomly spawned from current wave settings, so enemy spawning does not feel linear. You can: Set any amount of spawn points, and set/ change delay effect on it Set any amount of enemy types, set preferred spawn points for each of them, spawn ratio (per wave), and should that enemy be spawned from beginning or specific wave call Set specific events for specific waves, for example boss enemy/wave at wave 5 and 10 (in my example) You can set specific spawn points for specific enemies, so you could have specific enemies coming from certain areas (like flying, or wall crawling enemies) Certain spawn point can be locked and unlocked You can easily add any type of enemies via inspector, you could almost achieve same effect as in cod zombies in couple minutes Demo Move using AWSD, enemies are killed when you touch them. Play till level 10, so you would understand how it works. Spawn Manager script As it would be pretty confusing to set up, i am giving the whole project which shown in demo above. Download: Spawning.rar
  9. Hello everyone! I am having a bit of trouble with this Inventory System. My game is going fine but the only problem is that playing it would be pointless because the Inventory doesn't even save! If anyone knows how to implement saving please help! and I know the script is big sorry . Thanks SCRIPT : using UnityEngine; using System.Collections; using System.Collections.Generic; public class Player : MonoBehaviour { public Transform myTransform; public Transform myBody; public Transform myHips; public Transform mySpine; public Transform myCamera; public Transform mySpawnpoint; public List<Transform> myItems; private Multiplayer multiplayer; private Transform[] myArray; private CharacterMotor myCharMotor; public Texture2D[] CrossHairs; public Inventory myInventory; public GameObject[] AttackPrefabs; private ItemDatabase db; public float nextUseTime; public float myHealth; public const float MAX_HEALTH = 100; public float healthRegen; public float prevHealth; public bool hitted = false; public bool bleeding = false; public const float MAX_STATS = 100; public float myHunger; public float hungerTake; public float myThirst; public float thirstTake; public float arrowForce = 600.0f; private Texture2D texture_background; private Texture2D texture_hotbar; private Texture2D texture_inventory; private Texture2D texture_crafting; private Texture2D image; private Texture2D recipes; public bool isInventoryOpen = false; public float screenSizeMultiplier = 0.6f; public InventoryItem selectedItem; public Vector2 selectedPos; private Vector2 btnSize; private Vector2 mousePos; public GUISkin skin; void Start() { //Load myObjects myArray = new Transform[5]; myItems = new List<Transform>(); myTransform = transform; myArray[0] = myTransform; myBody = myTransform.FindChild("body"); myArray[1] = myBody; myHips = myBody.FindChild("Hips"); myArray[2] = myHips; mySpine = myHips.FindChild("Spine").FindChild("Spine1").FindChild("Spine2"); myArray[3] = mySpine; myCamera = mySpine.FindChild("MainCamera"); myArray[4] = myCamera; mySpawnpoint = myCamera.FindChild("Spawnpoint"); myCharMotor = myTransform.GetComponent<CharacterMotor>(); /***********************************/ //Select all items Transform itemHolder = mySpine.FindChild("RightShoulder").FindChild("RightArm").FindChild("RightForeArm").FindChild("RightHand").FindChild("Items"); foreach(Transform c in itemHolder) { myItems.Add(c); } EnableDisableItems(-1, false); //Disable all items. //Set default health options myHealth = 100; healthRegen = 1.3f; prevHealth = 100; //Set default hunger and thirst myHunger = 100; myThirst = 100; thirstTake = 0.1f; hungerTake = 0.01f; //Load Crosshairs CrossHairs = new Texture2D[3]; CrossHairs[0] = (Texture2D)Resources.Load("Textures/Crosshairs/Crosshair1"); //Default crosshair //Load GUI Textures texture_background = (Texture2D)Resources.Load("Textures/HUD/background"); texture_hotbar = (Texture2D)Resources.Load("Textures/HUD/hotbar"); texture_inventory = (Texture2D)Resources.Load("Textures/HUD/inventory"); texture_crafting = (Texture2D)Resources.Load("Textures/HUD/crafting"); recipes = (Texture2D)Resources.Load("Textures/HUD/recipes"); //Setup new Inventory myInventory = new Inventory(); selectedItem = InventoryItem.NULL; //Get db db = GameObject.Find("MPManager").GetComponent<ItemDatabase>(); multiplayer = GameObject.Find("MPManager").GetComponent<Multiplayer>(); btnSize = new Vector2(70.5f, 70.5f); if(GetComponent<NetworkView>().isMine) { InvokeRepeating("ThirstAndHungerController", 0, 1); } InvokeRepeating("UpdateSoundSettings", 0, 3); } void Update() { HealthController(); EquipmentController(); if(GetComponent<NetworkView>().isMine) { EquipmentUse(); } AnimationController(); } void UpdateSoundSettings() { GetComponent<AudioSource>().volume = multiplayer.GetComponent<AudioSource>().volume; } void HealthController() { if (myHealth < MAX_HEALTH) { if(bleeding) { myHealth -= healthRegen * Time.deltaTime; } else { myHealth += healthRegen * Time.deltaTime; } } if(myHunger > 80 && myThirst > 80) { healthRegen = 2.2f; } if (myHealth > MAX_HEALTH) { myHealth = MAX_HEALTH; } if (myHealth < 1 && GetComponent<NetworkView>().isMine) { GameObject.Find("SpawnManager").GetComponent<SpawnManager>().isDead = true; Network.RemoveRPCs(Network.player); GetComponent<NetworkView>().RPC("DestroySelf", RPCMode.All); } if(hitted) { GetComponent<NetworkView>().RPC("UpdateMyCurrentHealthEverywhere", RPCMode.Others, myHealth); hitted = false; } if (myHealth > 0 && GetComponent<NetworkView>().isMine) { if (myHealth != prevHealth) { GetComponent<NetworkView>().RPC("UpdateMyHealthEverywhere", RPCMode.AllBuffered, myHealth); } } } void ThirstAndHungerController() { if(myHunger > 0) { myHunger -= hungerTake; } else { bleeding = true; } /* if(myThirst > 0) { myThirst -= thirstTake; } else { bleeding = true; } * */ if(myThirst > 0 && myHunger > 0) { bleeding = false; } } void ReloadAmmo() { InventoryItem item = myInventory.getItemByPosition(myInventory.curItem); if(item.item.getType().Equals("Gun")) { int ammoLeft = 20 - item.status[2]; if(item.status[3] > ammoLeft) { item.status[2] += ammoLeft; item.status[3] -= ammoLeft; } else { item.status[2] += item.status[3]; item.status[3] = 0; } } } public void KickBack() { transform.position = Vector3.Lerp(transform.position, transform.position - (transform.forward - transform.up), 1); } void EquipmentUse() { if( Screen.lockCursor ) { if (Input.GetButton("Fire1") && Time.time > nextUseTime) { InventoryItem item = myInventory.getItemByPosition(myInventory.curItem); if(item.item.getType().Equals("Gun")) { //Check ammo if(item.status[2] < 1) { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "ReloadGun", true, 1f); Invoke("ReloadAmmo", 1f); return; } else { item.status[2]--; } } else if(item.item.getType().Equals("Consumable")) { if(item.item.getDescription().Contains("(Food)")) { if(myHunger < MAX_STATS) myHunger += item.item.getDamage(); } else if (item.item.getDescription().Contains("(Drink)")) { if (myHunger < MAX_STATS) myThirst += item.item.getDamage(); } myInventory.myItems[(int)myInventory.curItem.x, (int)myInventory.curItem.y] = InventoryItem.NULL; myInventory.RemoveFromHotbar(item); selectedItem = InventoryItem.NULL; selectedPos = new Vector2(29, 11); } else if (item.item.getType().Equals("Placeable")) { //myInventory.myItems[(int)myInventory.curItem.x, (int)myInventory.curItem.y] = InventoryItem.NULL; //myInventory.RemoveFromHotbar(item); //selectedItem = InventoryItem.NULL; //selectedPos = new Vector2(29, 11); } else if (item.item.getType().Equals("Bow")) { //Check ammo if (item.status[2] < 1) { Invoke("ReloadAmmo", 1f); return; } else { item.status[2]--; } } nextUseTime = Time.time + item.item.getUseDelay(); string animName = item.item.getUseAnimation(); GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, animName.Trim(), true, item.item.getAnimationSpeed()); GetComponent<NetworkView>().RPC( "SpawnAttack", RPCMode.All, mySpawnpoint.position, Quaternion.Euler(mySpawnpoint.eulerAngles.x + 90, mySpawnpoint.eulerAngles.y, 0), transform.name, item.item.ID); } if(Input.GetButtonDown("Reload")) { InventoryItem item = myInventory.getItemByPosition(myInventory.curItem); if (item.item.getType().Equals("Gun")) { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "ReloadGun", true, 1f); Invoke("ReloadAmmo", 1f); } } if (Input.GetButton("Fire2")) { myCamera.GetComponent<Camera>().fieldOfView = Mathf.Lerp(myCamera.GetComponent<Camera>().fieldOfView, 40f, 2f * Time.deltaTime); } else { myCamera.GetComponent<Camera>().fieldOfView = Mathf.Lerp(myCamera.GetComponent<Camera>().fieldOfView, 60f, 2f * Time.deltaTime); } } } public void DeletePlaceable() { InventoryItem item = myInventory.getItemByPosition(myInventory.curItem); myInventory.myItems[(int)myInventory.curItem.x, (int)myInventory.curItem.y] = InventoryItem.NULL; myInventory.RemoveFromHotbar(item); selectedItem = InventoryItem.NULL; selectedPos = new Vector2(29, 11); } void EquipmentController() { InventoryItem curItem = myInventory.getItemByPosition(myInventory.curItem); int goID; if(curItem.Equals(InventoryItem.NULL)) { goID = 0; } else { goID = myInventory.getItemByPosition(myInventory.curItem).item.ID; } if (myItems[goID] != null) { EnableDisableItems(-1, false); EnableDisableItems(goID, true); } else { EnableDisableItems(-1, false); myInventory.curItem = new Vector2(0,0); } if(GetComponent<NetworkView>().isMine) { if (Input.GetMouseButtonDown(1) && !selectedItem.Equals(InventoryItem.NULL)) { selectedItem = InventoryItem.NULL; } if (Input.GetKeyDown(KeyCode.Alpha1)) { myInventory.curItem = myInventory.myHotbar[0]; GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "SwitchItem", true, 1.0f); } if (Input.GetKeyDown(KeyCode.Alpha2)) { myInventory.curItem = myInventory.myHotbar[1]; GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "SwitchItem", true, 1.0f); } if (Input.GetKeyDown(KeyCode.Alpha3)) { myInventory.curItem = myInventory.myHotbar[2]; GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "SwitchItem", true, 1.0f); } if (Input.GetKeyDown(KeyCode.Alpha4)) { myInventory.curItem = myInventory.myHotbar[3]; GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "SwitchItem", true, 1.0f); } if (Input.GetKeyDown(KeyCode.Alpha5)) { myInventory.curItem = myInventory.myHotbar[4]; GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "SwitchItem", true, 1.0f); } if(Input.GetButtonDown("Friendly")) { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "Friendly", true, 1.0f); } if(Input.GetButtonDown("Inventory")) { isInventoryOpen = !isInventoryOpen; multiplayer.EnableDisablePlayer(!isInventoryOpen); if (isInventoryOpen) multiplayer.gameState = Multiplayer.GameState.INVENTORY; else multiplayer.gameState = Multiplayer.GameState.PLAYING; } GetComponent<NetworkView>().RPC("SendCurrentItem", RPCMode.Others, (int)myInventory.curItem.x, (int)myInventory.curItem.y); } } void EnableDisableItems(int index, bool enable) { if(index == -1) { for (int i = 0; i < myItems.Count; i++) { myItems[i].gameObject.SetActive(enable); } } else { myItems[index].gameObject.SetActive(enable); } } int GetItemIndex(string GameObjectName) { for (int i = 0; i < myItems.Count; i++) { if (myItems[i].gameObject.name.Equals(GameObjectName)) return i; } return -1; } void OnGUI() { if(GetComponent<NetworkView>().isMine) { mousePos = new Vector2 (Input.mousePosition.x, -Input.mousePosition.y + Screen.height); GUI.skin = skin; if(multiplayer.gameState.Equals(Multiplayer.GameState.PLAYING) || multiplayer.gameState.Equals(Multiplayer.GameState.INVENTORY)) { //Draw Crosshair GUI.DrawTexture(new Rect(Screen.width / 2 - CrossHairs[0].width / 2, Screen.height / 2 - CrossHairs[0].height / 2, CrossHairs[0].width, CrossHairs[0].height), CrossHairs[0]); //Draw Hotbar and Inventory GUIController(); } if (Input.GetButton("Recipes")) { GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), recipes, ScaleMode.StretchToFill); } } } void GUIController() { if(isInventoryOpen) { //Draw Background GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), texture_background, ScaleMode.StretchToFill); //Draw Crafting float craft_w = texture_crafting.width * screenSizeMultiplier; float craft_h = texture_crafting.height * screenSizeMultiplier; Rect craftRect = new Rect(Screen.width / 2 - craft_w / 2, 0, craft_w, craft_h); GUI.DrawTexture(craftRect, texture_crafting); int btnsToShow = 1; for (int i = 0; i < myInventory.craftList.Count; i++) { if(!myInventory.craftList[i].Equals(InventoryItem.NULL)) { btnsToShow++; } } if(GUI.Button(new Rect(Screen.width - 100, 10, 100, 50), "Clear")) { myInventory.ClearCraftList(); } if (btnsToShow > 4) { btnsToShow = 4; } if(btnsToShow > 1) { //Lets see the recipe so far InventoryItem itemToCraft = db.getItemForRecipe(myInventory.craftList); if(!itemToCraft.Equals(InventoryItem.NULL)) { Vector2 startPos = new Vector2(craftRect.x + 12f * screenSizeMultiplier, craftRect.y + 60f * screenSizeMultiplier); Vector2 btnPos = startPos + new Vector2(btnSize.x * screenSizeMultiplier * 5 + (12f * screenSizeMultiplier * 5), 0); Texture2D image = (Texture2D)Resources.Load("Textures/Items/" + itemToCraft.item.ID); if (GUI.Button(new Rect(btnPos.x, btnPos.y, (btnSize.x) * screenSizeMultiplier, (btnSize.y - 10f) * screenSizeMultiplier), image)) { RemoveItemNetwork(db.getRecipeToRemove(itemToCraft, myInventory.craftList)); //Take the used resources myInventory.ClearCraftList(); //Clear craft list if(AddItemNetwork(itemToCraft)) { Debug.Log("Added Item"); } itemToCraft = InventoryItem.NULL; } } } for (int i = 0; i < btnsToShow; i++) { Vector2 startPos = new Vector2(craftRect.x + 12f * screenSizeMultiplier, craftRect.y + 60f * screenSizeMultiplier); Vector2 btnPos = startPos + new Vector2(btnSize.x * screenSizeMultiplier * i + (12f * screenSizeMultiplier * i), 0); if(myInventory.craftList[i].Equals(InventoryItem.NULL)) { if (GUI.Button(new Rect(btnPos.x, btnPos.y, (btnSize.x) * screenSizeMultiplier, (btnSize.y - 10f) * screenSizeMultiplier), "")) { if (!selectedItem.Equals(InventoryItem.NULL)) { myInventory.craftList[i] = selectedItem ; selectedItem = InventoryItem.NULL; selectedPos = new Vector2(29, 11); } } } else { Texture2D image = (Texture2D)Resources.Load("Textures/Items/" + myInventory.craftList[i].item.ID); GUI.DrawTexture(new Rect(btnPos.x, btnPos.y, (btnSize.x) * screenSizeMultiplier, (btnSize.y - 10f) * screenSizeMultiplier), image); } } //Draw Inventory float inv_w = texture_inventory.width * screenSizeMultiplier; float inv_h = texture_inventory.height * screenSizeMultiplier; Rect windowRect = new Rect(Screen.width / 2 - inv_w / 2, Screen.height / 2 - inv_h / 2, inv_w, inv_h); GUI.DrawTexture(windowRect, texture_inventory); //Drop Item if(!selectedItem.Equals(InventoryItem.NULL) && !selectedItem.item.getType().Equals("Placeable")) { if(GUI.Button(new Rect(10, 10, 100, 50), "Drop")) { if(selectedItem.status[0] > 1) //If stackable { selectedItem.status[0]--; } else { myInventory.myItems[(int)selectedPos.x, (int)selectedPos.y] = InventoryItem.NULL; myInventory.RemoveFromHotbar(selectedItem); } Network.Instantiate((Object)Resources.Load("Prefabs/Drop/" + selectedItem.item.Name), myTransform.position, Quaternion.identity, 2); selectedItem = InventoryItem.NULL; selectedPos = new Vector2(29, 11); } } //Draw Inventory Items for (int y = 0; y < myInventory.myItems.GetLength(1); y++) { for (int x = 0; x < myInventory.myItems.GetLength(0); x++) { Vector2 startPos = new Vector2(windowRect.x + 12f * screenSizeMultiplier, windowRect.y + 75f * screenSizeMultiplier); Vector2 pos = new Vector2(x, y); Vector2 btnPos = startPos + new Vector2(btnSize.x * screenSizeMultiplier * x + (12f * screenSizeMultiplier * x), btnSize.y * screenSizeMultiplier * y + (12f * screenSizeMultiplier * y)); if(myInventory.unlocked[x,y]) { if(myInventory.myItems[x,y].Equals(InventoryItem.NULL)) { //Trocar com o fists if (GUI.Button(new Rect(btnPos.x, btnPos.y, btnSize.x * screenSizeMultiplier, btnSize.y * screenSizeMultiplier), "")) { if(!selectedItem.Equals(InventoryItem.NULL)) { if (!selectedPos.Equals(new Vector2(29, 11))) myInventory.UpdateHotbar(selectedPos, new Vector2(x,y)); myInventory.myItems[x, y] = selectedItem; selectedItem = InventoryItem.NULL; if(!selectedPos.Equals(new Vector2(29, 11))) myInventory.myItems[(int)selectedPos.x, (int)selectedPos.y] = InventoryItem.NULL; selectedPos = new Vector2(29, 11); } } } else { InventoryItem item = myInventory.myItems[x, y]; image = (Texture2D)Resources.Load("Textures/Items/" + item.item.ID); if(!selectedItem.Equals(InventoryItem.NULL)) { //We have a selected item, and we want to replace with other item. if (GUI.Button(new Rect(btnPos.x, btnPos.y, btnSize.x * screenSizeMultiplier, btnSize.y * screenSizeMultiplier), image)) { myInventory.myItems[(int)selectedPos.x, (int)selectedPos.y] = item; myInventory.myItems[x, y] = selectedItem; selectedItem = InventoryItem.NULL; selectedPos = new Vector2(29, 11); } if (item.status[1] != 0) //If its stackable { GUI.Label(new Rect(btnPos.x + (btnSize.x * screenSizeMultiplier / 2), btnPos.y + btnSize.y * screenSizeMultiplier - 20, 30, 20), "x" + item.status[0].ToString()); } } else { //We want to choose an item if (GUI.Button(new Rect(btnPos.x, btnPos.y, btnSize.x * screenSizeMultiplier, btnSize.y * screenSizeMultiplier), image)) { selectedItem = item; selectedPos = new Vector2(x, y); } if (item.status[1] != 0) //If its stackable { GUI.Label(new Rect(btnPos.x + (btnSize.x * screenSizeMultiplier / 2), btnPos.y + btnSize.y * screenSizeMultiplier - 20, 30, 20), "x" + item.status[0].ToString()); } } } } } } //Draw Hotbar with buttons float hotbar_w = texture_hotbar.width * screenSizeMultiplier; float hotbar_h = texture_hotbar.height * screenSizeMultiplier; GUI.DrawTexture(new Rect( Screen.width / 2 - hotbar_w / 2, Screen.height - hotbar_h, hotbar_w, hotbar_h), texture_hotbar); for(int i = 0; i < myInventory.myHotbar.Length; i++) { Vector2 hotbarItem = myInventory.myHotbar[i]; float img_w = 87 * screenSizeMultiplier; float img_h = 87 * screenSizeMultiplier; float base_x = Screen.width / 2 - hotbar_w / 2 + (12 * screenSizeMultiplier) + (img_w * i) + (12 * screenSizeMultiplier * i); float base_y = Screen.height - hotbar_h + 12; InventoryItem item = myInventory.getItemByPosition(myInventory.myHotbar[i]); Texture2D image = (Texture2D)Resources.Load("Textures/Items/" + item.item.ID); if(!hotbarItem.Equals(new Vector2(29, 11))) { if(item.item.ID != 0) { if (GUI.Button(new Rect(base_x, base_y, img_w, img_h), image)) { if(!selectedItem.Equals(InventoryItem.NULL)) { myInventory.myHotbar[i] = myInventory.getItemPosition(item.item); selectedItem = InventoryItem.NULL; selectedPos = new Vector2(29, 11); } else { if(Event.current.button == 1) { myInventory.myHotbar[i] = new Vector2(29, 11); } } } } } else { if (GUI.Button(new Rect(base_x, base_y, img_w, img_h), image)) { if(!selectedItem.Equals(InventoryItem.NULL)) { myInventory.myHotbar[i] = myInventory.getItemPosition(selectedItem.item); selectedItem = InventoryItem.NULL; selectedPos = new Vector2(29, 11); } } } } if(!selectedItem.Equals(InventoryItem.NULL)) { Texture2D image = (Texture2D)Resources.Load("Textures/Items/" + selectedItem.item.ID); GUI.Box(new Rect(mousePos.x, mousePos.y, btnSize.x, btnSize.y), image); } //Debug /* for (int y = 0; y < myInventory.myItems.GetLength(1); y++) { for (int x = 0; x < myInventory.myItems.GetLength(0); x++) { GUI.Label(new Rect(0 + x * 100, 0 + y * 20, 100, 20), myInventory.myItems[x, y].item.Name); } } for(int i = 0; i < myInventory.myHotbar.Length; i++) { GUI.Label(new Rect(0 + i * 100, 150, 100, 20), myInventory.myHotbar[i].ToString()); } GUI.Label(new Rect(0, 170, 500, 20), selectedItem.item.Name + " " + selectedPos.ToString()); * */ } else { //Draw Hotbar float hotbar_w = texture_hotbar.width * screenSizeMultiplier; float hotbar_h = texture_hotbar.height * screenSizeMultiplier; GUI.DrawTexture(new Rect( Screen.width / 2 - hotbar_w / 2, Screen.height - hotbar_h, hotbar_w, hotbar_h), texture_hotbar); //Draw Hotbar Items for (int i = 0; i < myInventory.myHotbar.Length; i++) { float img_w = 87 * screenSizeMultiplier; float img_h = 87 * screenSizeMultiplier; float base_x = Screen.width / 2 - hotbar_w / 2 + (12 * screenSizeMultiplier) + (img_w * i) + (12 * screenSizeMultiplier * i); float base_y = Screen.height - hotbar_h + 12; InventoryItem item = myInventory.getItemByPosition(myInventory.myHotbar[i]); //Item in the hotbar Texture2D image = (Texture2D)Resources.Load("Textures/Items/" + item.item.ID); GUI.DrawTexture(new Rect(base_x, base_y, img_w, img_h), image); } } } void AnimationController() { //Walk Animation if(myCharMotor.movement.velocity.magnitude >= 2) { if(!myHips.GetComponent<Animation>().isPlaying) { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 2, "Walk", true, 1.0f); } } //Weapons if(!mySpine.GetComponent<Animation>().isPlaying) { if (myInventory.getItemByPosition(myInventory.curItem).Equals(InventoryItem.NULL)) { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "IdleFists", true, 1.0f); } else { if (myInventory.getItemByPosition(myInventory.curItem).item.Type.Equals("MeleeDual")) //Dual Wield { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "IdleDualHands", true, 1.0f); } else if (myInventory.getItemByPosition(myInventory.curItem).item.Type.Equals("MeleeSpear")) //Spear Wield { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "SpearIdle", true, 1.0f); } else if (myInventory.getItemByPosition(myInventory.curItem).item.Type.Equals("MeleeOne")) //One hand weapon { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "OneHandIdle", true, 1.0f); } else if (myInventory.getItemByPosition(myInventory.curItem).item.Type.Equals("Item")) //Item Idle { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "IdleDualHands", true, 1.0f); } else if (myInventory.getItemByPosition(myInventory.curItem).item.Type.Equals("Gun")) //Gun Idle { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "IdleGunDualHands", true, 1.0f); } else if (myInventory.getItemByPosition(myInventory.curItem).item.Type.Equals("Bow")) //Bow Idle { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "IdleDualHands", true, 1.0f); } else if (myInventory.getItemByPosition(myInventory.curItem).item.Type.Equals("Consumable")) //Bow Idle { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "IdleDualHands", true, 1.0f); } else if (myInventory.getItemByPosition(myInventory.curItem).item.Type.Equals("Placeable")) //Bow Idle { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "IdleDualHands", true, 1.0f); } else { GetComponent<NetworkView>().RPC("NetworkAnimation", RPCMode.All, 3, "IdleFists", true, 1.0f); } } } } void SpawnSound(Vector3 pos, string clipName) { GameObject go = (GameObject)Resources.Load("Prefabs/General/AudioSpawner"); go = Instantiate(go, pos, Quaternion.identity) as GameObject; go.GetComponent<AudioSource>().PlayOneShot((AudioClip)Resources.Load("Sounds/" + clipName)); } IEnumerator InstantiateAttack(Vector3 pos, Quaternion rot, string owner, int itemID, float delay) { yield return new WaitForSeconds(delay); SpawnSound(transform.position, db.Items[itemID].getAudioName()); if (!pos.Equals(mySpawnpoint.position)) { pos = mySpawnpoint.position; } if(!rot.Equals(Quaternion.Euler(mySpawnpoint.eulerAngles.x + 90, mySpawnpoint.eulerAngles.y, 0))) { rot = Quaternion.Euler(mySpawnpoint.eulerAngles.x + 90, mySpawnpoint.eulerAngles.y, 0); } GameObject go = Instantiate(AttackPrefabs[db.Items[itemID].getPrefabAttack()], pos, rot) as GameObject; MeleeAttack m = go.GetComponent<MeleeAttack>(); if(m != null) { m.owner = owner; m.weaponID = itemID; } else { go.GetComponent<Arrow>().owner = owner; go.GetComponent<Arrow>().weaponID = itemID; go.GetComponent<Rigidbody>().AddForce(mySpawnpoint.forward * arrowForce); } } public bool AddItemNetwork(InventoryItem item) { Vector2 slot = myInventory.getNextAvailableSlot(); if(myInventory.AddItem(item)) { GetComponent<NetworkView>().RPC("AddItemOverNetwork", RPCMode.OthersBuffered, item.item.ID, (int)slot.x, (int)slot.y); return true; } else { return false; } } public bool RemoveItemNetwork(InventoryItem item, int qtd) { Vector2 slot = myInventory.getItemPosition(item.item); if (myInventory.RemoveItem(item, qtd)) { GetComponent<NetworkView>().RPC("RemoveItemOverNetwork", RPCMode.OthersBuffered, item.item.ID, qtd); return true; } else { return false; } } public bool RemoveItemNetwork(List<InventoryItem> item) { for(int x = 0; x < item.Count; x++) { Vector2 slot = myInventory.getItemPosition(item[x].item); if (myInventory.RemoveItem(item[x], item[x].status[0])) { GetComponent<NetworkView>().RPC("RemoveItemOverNetwork", RPCMode.OthersBuffered, item[x].item.ID, item[x].status[0]); } } return true; } /* * RPC's */ [RPC] void SpawnAttack(Vector3 pos, Quaternion rot, string owner, int itemID) { StartCoroutine( InstantiateAttack( pos, rot, owner, itemID, db.Items[itemID].getAttackSpawnDelay() )); } [RPC] void NetworkAnimation(int trans, string anim, bool cf, float AnimSpeed) { if(myArray[trans] != null) myArray[trans].GetComponent<Animation>()[anim].speed = AnimSpeed; if (cf) //Crossfade? { myArray[trans].GetComponent<Animation>().CrossFade(anim); } else { myArray[trans].GetComponent<Animation>().Play(anim); } } [RPC] void SendCurrentItem(int x, int y) { myInventory.curItem = new Vector2(x, y); } [RPC] void DestroySelf() { Destroy(gameObject); } [RPC] void UpdateMyHealthEverywhere( float hp) { prevHealth = hp; } [RPC] void UpdateMyCurrentHealthEverywhere(float hP) { myHealth = hP; } [RPC] public void AddItemOverNetwork(int itemID, int x, int y) { multiplayer.GetComponent<Console>().Write("AddItemOverNetwork Called in player " + gameObject.name); Item i = GameObject.Find("MPManager").GetComponent<ItemDatabase>().getItemByID(itemID); myInventory.myItems[x, y] = new InventoryItem(i, InventoryItem.DefaultStatus(false, 0, 1)); multiplayer.GetComponent<Console>().Write("Item " + i.ToString() + " added to " + new Vector2(x,y).ToString() + " on player " + gameObject.name); } [RPC] public void RemoveItemOverNetwork(int itemID, int qtd) { multiplayer.GetComponent<Console>().Write("RemoveItemOverNetwork Called in player " + gameObject.name); Item i = GameObject.Find("MPManager").GetComponent<ItemDatabase>().getItemByID(itemID); InventoryItem itemToDelete = new InventoryItem(i, InventoryItem.DefaultStatus(false, 1, 1)); if (myInventory.RemoveItem(itemToDelete, qtd)) { multiplayer.GetComponent<Console>().Write("Item " + i.ToString() + " removed on player " + gameObject.name); } else { multiplayer.GetComponent<Console>().Error("Item couldn't be removed!"); } } } public class Inventory { public Vector2 curItem; public InventoryItem[,] myItems; public bool[,] unlocked; public Vector2[] myHotbar; public int maxItems; public List<InventoryItem> craftList; public Inventory() { curItem = new Vector2(29, 11); myItems = new InventoryItem[6, 5]; unlocked = new bool[6, 5]; craftList = new List<InventoryItem>(); myHotbar = new Vector2[5]; maxItems = 10; ItemDatabase db = GameObject.Find("MPManager").GetComponent<ItemDatabase>(); setupArray(); OpenSlots(12); AddItem(new InventoryItem(db.getItemByName("WoodAxe"), InventoryItem.DefaultStatus(false, 0, 1))); } public void UpdateHotbar(Vector2 old, Vector2 newpos) { for (int i = 0; i < myHotbar.Length; i++) { if (myHotbar[i].Equals(old)) myHotbar[i] = newpos; } } public void ClearCraftList() { for (int i = 0; i < craftList.Count; i++) { craftList[i] = InventoryItem.NULL; } } public void setupArray() { for (int i = 0; i < myHotbar.Length; i++) { myHotbar[i] = new Vector2(29, 11); } for (int y = 0; y < myItems.GetLength(1); y++) { for (int x = 0; x < myItems.GetLength(0); x++) { myItems[x, y] = InventoryItem.NULL; } } for (int i = 0; i < 4; i++) { craftList.Add(InventoryItem.NULL); } } public InventoryItem getItemByPosition(Vector2 pos) { if (isValid(pos)) { if (!myItems[(int)pos.x, (int)pos.y].Equals(InventoryItem.NULL)) { return myItems[(int)pos.x, (int)pos.y]; } else { return InventoryItem.NULL; } } return InventoryItem.NULL; } public Vector2 getItemPosition(Item item) { for (int y = 0; y < myItems.GetLength(1); y++) { for (int x = 0; x < myItems.GetLength(0); x++) { if (myItems[x, y] != null) { if (myItems[x, y].item.Equals(item)) { return new Vector2(x, y); } } } } return new Vector2(29, 11); } public Vector2 getNextAvailableSlot() { for (int y = 0; y < unlocked.GetLength(1); y++) { for (int x = 0; x < unlocked.GetLength(0); x++) { if (myItems[x, y].Equals(InventoryItem.NULL) && unlocked[x, y]) { return new Vector2(x, y); } } } return new Vector2(29, 11); } public Vector2 getNextSlot() { for (int y = 0; y < myItems.GetLength(1); y++) { for (int x = 0; x < myItems.GetLength(0); x++) { if (unlocked[x, y] == false) { return new Vector2(x, y); } } } return new Vector2(29, 11); } public static bool isValid(Vector2 validate) { return !validate.Equals(new Vector2(29, 11)); } public bool AddItem(InventoryItem newItem, Vector2 slot) { if (isValid(slot)) { if (newItem.status[1] != 0) //Item is stackable { if (isValid(getItemPosition(newItem.item)) && getItemByPosition(getItemPosition(newItem.item)).status[0] < 10) //Already exists, lets add to the stack. { int pos_x = (int)getItemPosition(newItem.item).x; int pos_y = (int)getItemPosition(newItem.item).y; myItems[pos_x, pos_y].status[0]++; //Increase the amount of the item return true; //Success on adding the item. } else //Item doesn't exist yet { myItems[(int)slot.x, (int)slot.y] = newItem; return true; } } else { //Item is not stackable, so add it to a new position myItems[(int)slot.x, (int)slot.y] = newItem; return true; } } return false; } public void OpenSlots(int amount) { Vector2 start = getNextSlot(); int done = 0; for (int y = (int)start.y; y < myItems.GetLength(1); y++) { for (int x = (int)start.x; x < myItems.GetLength(0); x++) { if (done < amount) { unlocked[x, y] = true; done++; } } } } public bool AddItem(InventoryItem item) { Vector2 position = getNextAvailableSlot(); if (isValid(position)) { if (AddItem(item, position)) { return true; } else { return false; } } return false; } public bool RemoveItem(InventoryItem item, int qtd) { Vector2 position = getItemPosition(item.item); if(isValid(position)) { InventoryItem i = myItems[(int)position.x, (int)position.y]; int itemQtd = i.status[0]; if(itemQtd - qtd < 1) { //Remover o item todo myItems[(int)position.x, (int)position.y] = InventoryItem.NULL; } else { i.status[0] -= qtd; } return true; } else { return false; } } public bool RemoveItem(List<InventoryItem> item) { for(int x = 0; x < item.Count; x++) { Vector2 position = getItemPosition(item[x].item); if (isValid(position)) { InventoryItem i = myItems[(int)position.x, (int)position.y]; int itemQtd = i.status[0]; if (itemQtd - item[x].status[0] < 1) { //Remover o item todo myItems[(int)position.x, (int)position.y] = InventoryItem.NULL; } else { i.status[0] -= item[x].status[0]; } } } return true; } public void RemoveFromHotbar(InventoryItem item) { Vector2 posToRemove = getItemPosition(item.item); for (int i = 0; i < myHotbar.Length; i++) { if (myHotbar[i].Equals(posToRemove)) { myHotbar[i] = new Vector2(29, 11); } } } } public class InventoryItem { public Item item; public List<int> status; public InventoryItem(Item i, List<int> s) { this.item = i; this.status = s; } public static List<int> DefaultStatus(bool stackable, int stackAmmount, int quantity) { //Status Configuration: //Quantity | Stackable | Ammo | Extra Ammo List<int> s = new List<int>(); if(stackable) { s.Add(quantity); //First is quantity s.Add(stackAmmount); //Second is stackable size } else { s.Add(quantity); //First Quantity s.Add(0); } s.Add(20); s.Add(40); return s; } public override string ToString() { if (item == null) return "Inv item with null item"; else return "InvItem | " + item.ToString(); } public static InventoryItem NULL = new InventoryItem(GameObject.Find("MPManager").GetComponent<ItemDatabase>().getItemByName("Fists"), null); }
  10. Hello guys! In this tutorial we are going to create a wheater system! It is just a quick tutorial, so if you have any questions or you want more in-depht please ask! In this tutorial we are going to create a particle system for the "world" rain, the "camera" effects, the clouds and the thunder! I hope you guys like it! (also I got a little question, do you think foreach serie a new thread or shall I make one big thread for all the tutorials?)
  11. In this video I make the Score system! https://youtu.be/L69g7ZR83-M
  12. In this video I made "dot pooler" system to spawn in my dotes. Ps: The small mistakes are the worst! https://youtu.be/YHXw-peTzj4
  13. Hello everyone! I've created another package inside Unity called Vaijk Network Chat. This package includes many features such as: - Simple network framework; - Chat scrollbar; - Custom text wrapping; - Random player name colors; - Adapted for both the legacy GUI and the new Unity UI system; - Adapted for both the legacy Network system and the new UNET system; - 2 straight-forward scripts. Price for the package: only $2.99 Feel like taking a better look at it? Check it out at Sellfy: https://sellfy.com/p/wz7v Thanks! Especial note: A massive thank you to everyone who has purchased my other package (the Wave Survival Multiplayer package), I just wanted to let you guys know that the motivation and self-improvement that this has proportionated to me is beyond words. Again, thank you very much. Sometimes I think that I'm not selling assets, but instead receiving donations and giving something back in gratitude!
  14. In this video I make the hp system. https://www.youtube.com/watch?v=qJfNTyHGPEo
  15. In this video i finished to make the spawning system https://www.youtube.com/watch?v=SBxP6b77OJ4&feature=youtu.be
  16. Hello everyone!, here is a link to a video of a weapon system i am working on that is still a work in progress, i am looking for feedback mainly for the recoil and kick, i need your feedback to adjust it for maximum realism. Thanks in advance!, Kind Regards: Hamad Almannai Link to video: https://www.youtube.com/watch?v=CmmhNRT67Js&feature=youtu.be
  17. Hello friends ArmedUnity forum I came to bring a whole unique system done for me, and I'm sharing with you here. Characteristics: Add and Remove User Limit the amount of friends you can have System inspired in AU Modern FPS. Created by: Alien_Halls [Matheus Henrique Alves] Higor_Gamer[Higor Klein] _____=====[EXCLUSIVE]=====_____ using UnityEngine; using System.Collections; using System.Collections.Generic; public class Friendy : MonoBehaviour { public GUISkin GUI_SKIN; public Vector2 scroll; public bool ShowWindow; [Header("Menu Friendly")] private float FDPosX = -3.68f; private float FDPosY = 41.8f; private float FDSizeX = 4.4f; private float FDSizeY = 1.89f; [Header("Menu Button")] private float BTPosX = -3.12f; private float BTPosY = -2.38f; private float BTSizeX = 5.63f; private float BTSizeY = 13.4f; public List<string> Friends = new List<string>(); public string Add; public int MaxFriend = 10; // Use this for initialization void Start () { } // Update is called once per frame void Update () { } void OnGUI () { GUI.skin = GUI_SKIN; if(!ShowWindow){ MenuButton(); }else{ MenuWindow(); } } void MenuWindow() { GUILayout.BeginArea(new Rect (Screen.width / 2 - Screen.width / FDPosX, Screen.height / 2 - Screen.height / FDPosY, Screen.width / FDSizeX, Screen.height / FDSizeY), "", GUI_SKIN.customStyles[0]); GUILayout.Box("You Have: ["+Friends.Count+"/"+MaxFriend+"] Friend."); scroll = GUILayout.BeginScrollView(scroll); GUILayout.BeginVertical(); for(int i = 0; i< Friends.Count; i++) { GUILayout.BeginHorizontal(); GUILayout.Space(25); GUILayout.Box(Friends[i], GUILayout.Width(170), GUILayout.Height(35)); if(GUILayout.Button("X", GUILayout.Width(35), GUILayout.Height(35))){ Friends.RemoveAt(i); } GUILayout.EndHorizontal(); } GUILayout.EndVertical(); GUILayout.EndScrollView(); GUILayout.Space(20); if(Friends.Count >= MaxFriend){ GUILayout.Box("You Have Reached The Maximum Of Friends."); }else{ GUILayout.BeginHorizontal(); Add = GUILayout.TextArea(Add, 20); if(GUILayout.Button("ADD", GUILayout.Width(60))){ if(Add == string.Empty){ print("Complete All Fields to Add!"); }else{ Friends.Add(Add); Add = ""; } } if(GUILayout.Button("Close", GUILayout.Width(60))){ShowWindow = false;} GUILayout.EndHorizontal(); } GUILayout.EndArea(); } void MenuButton() { GUILayout.BeginArea(new Rect (Screen.width/2 - Screen.width/BTPosX, Screen.height/2 - Screen.height/BTPosY, Screen.width/BTSizeX, Screen.height/BTSizeY), "", GUI_SKIN.customStyles[0]); if(GUILayout.Button("Show Friends", GUILayout.Height(35))){ ShowWindow = true; } GUILayout.EndArea(); } }
  18. Here is a free package that i made, is a top down shooter camera system ----------------------------------------------------------------------------------------------------- Note: is just the camera system, is not a shooting system :/ Note: Models are from botcamp and the player is from makehuman but you can change it ----------------------------------------------------------------------------------------------------- Images: http://s1056.photobucket.com/user/trollnonimo14/media/bhkljkfg_zpsyoxygnix.jpg.html?o=0 Download: http://www.mediafire.com/download/1ia8wo88e3pjfw3/TopDownShooter.rar
  19. Introduction Hello there guys! I haven't been active in the Showcase-section in a while, but now I am. ..Introducing a very accurate and improved Audiosystem inside Unity3D. As you've read the title of this topic, you can see that it is saying "CryEngine-like" (Crytek). Well, by that I mean the game-creating engine that was used to make the game-series of Crysis. So, but I wasn't just focused on this game-serie only, but also games that use a similar system; like FarCry 3 and FarCry 2. What is this? (Explanation) Okay, so now you may be wondering what "new" audiosystem I'm talking about. For those who played any of the games above you may have noticed that when you're shooting (for example) an Assault Rifle a gunshot will be played. But not just A Gunshot. They are using a looped Audioclip when you hold your Left MouseButton down, and once your MouseButton is up the echoing sound will be played. Do you understand what I'm trying to explain? I personally call it a "surpression-effect". So that is what I did using 2 scripts to keep everything accurate and having no extra-delay between every shot, just very accurate. Can I try a (web)demo somewhere? Well, finally you can. I have put a WebDemo-link below. Please read the controls and the Notes before you start playing. Here's the important Note #1 (before you start playing -- Press spoiler-button): Here's Note #2: This demonstration is not supposed to be a real game as deployment, but actually a technical demo. Here are the controls on how to play: - W, A, S and D to move around - Use your mouse to look around - Left MouseButton to shoot (Hold for Surpression-effect) - Z-key to zoom in/out - G-key and H-key to shout some useless Soldier-commands (no one can hear you) - Further controls can be seen while playing on the left corners of your screen. Play: https://dl.dropboxusercontent.com/u/96401752/Webdemo_AU%20(1)%20-%20Audiosys./WebDemo_AU.html Have fun looking around!
  20. TheGameDev

    Help

    Can someone help me with script i want to make a game with building system like in The Forest please if you know help me.
  21. I Decided to make this, for don't need to write a Complex other programing language parser (for example: Python or Lua), and this is very simple: I will not teach you how to create the Loader, but how to use this... USAGE Tutorial Link: HERE
  22. public List<ItemClass> playerInventory = new List<ItemClass>(); void DrawInventory(int windowID) { for (int i = 0; i < playerInventory.Count; i++) { if (GUILayout.Button(playerInventory.itemIcon, GUILayout.Width(100), GUILayout.Height(100))) { Debug.log(playerInventory.itemName + " Used"); } } } this is my inventory window function what i want to do is the first 6 items will be in one line the the next 6 items in a difrent line and so on... i have 2 questions: 1.can i use the new 4.6 UI system to do this? 2.how can i do this using GUILayout.BeginHorizintal("");?
  23. Hello everyone i just want to say that i am currently working on a zombie survival game everything looks very nice i am currently makng the game with Unity (Latest Version) and Realistic FPS Prefab the only thing that im having problems with is the Inventory System if anyone can help me make an inventory system you will be in the credits for my game thanks. youtube.com/downfallnew subscribe watch the trailer on my youtube channel <iframe width="560" height="315" src="//www.youtube.com/embed/vPhL-OuHa_Q?list=UU1Yn2K9zJ8VRlSAjfhIPtOA" frameborder="0" allowfullscreen></iframe>
  24. Advanced Elevator System AES is the ultimate solution for professional elevators,it supports unlimited number of floors, sounds for button clicking, doors and moving. It also supports door system, using position. You can set up an elevator out of the box within minutes using the very easy custom inspector. One of the best features is the button creator tool, using it you can easily create buttons for your elevator and set them up easily, either is a door open/close button, am emergency stop button, an elevator call button or a navigation button. You can set up the door's speed, the elevator's speed, (the reset floor)* and the (reset timer)*. The (..)* are used when the player press the emergency stop button, the elevator immediately stops, the doors automatically opens, and stays there until the reset timer runs out, then the door will close and the elevator will go to the reset floor. Inspector : Button Creator :
  25. Hey! I updated my crafting system, including an update on gathering resources, and new inventory! All scripts from the video included and the icons for the inventory items! Video on how to set up the scene will be linked here after it's posted! https://www.youtube.com/watch?v=UpOnBwtBl3s Hope you enjoy it! Please let me know if there are any problems.
×
×
  • Create New...