UNITY3D WAREHOUSE

WELCOME TO COMMUNITY.

OOOOOMG

I"M SO !!!.

!!!

Coming Soon.

!!!

Coming Soon..

Friday, 30 January 2015

Unity3D Platformer Progress bar Tutorial 10

Unity3D  Platformer Progress bar Tutorial 10







THIS IS Java scrip: GOOD 4 2D GAMES AND 3D GAMES !
----------------------------------------­­­­­------------------------------------­-­-­-­-­------



// set GUI bar width and height
var barWidth : float = 500;
var barHeight : float = 25;

// drag a texture as the icon
var progIcon : Texture;

// where to set the GUI element to
private var barProgress : float;

// empty objects represent the start and end of a
var startPoint : Transform;
var endPoint : Transform;

// current Player position
var playerPos : Transform;

function Update(){
 // get level distance by subtracting start and
 var totalDist : float = endPoint.position.x -
startPoint.position.x;

 // get player distance from start in X axis only

 var playerDist : float = playerPos.position.x -
startPoint.position.x;

 //get player's progress as a percentage of the
 var playerProgress : float = playerDist /
totalDist * 100;

 //turn the playerProgress percentage back into
 barProgress = playerProgress / 100 * barWidth;

}

function OnGUI() {
 //  width of the bar
 //  for 'Start' and 'End'
 GUI.BeginGroup (new Rect (250, 10, barWidth,
barHeight*2));

  //draw a box as the backing for the progress
  GUI.Box(Rect(0,0,barWidth,barHeight),"");

  // create a label to draw the progress icon
  // to set its X position, 0 as the Y position

  GUI.Label (Rect (barProgress, 0,
progIcon.width, progIcon.height),
        progIcon);

  // add start and end labels
  GUI.Label(Rect(progIcon.width/2, 1, 50,
barHeight),"Start");
  GUI.Label(Rect(barWidth-30, 1, 100,
barHeight),"End");

 GUI.EndGroup();
}


----------------------------------------­­­--------------------------------------­-­-­-

Tuesday, 27 January 2015

Unity3D Simple Simple pause Tutorial 9

Unity3D Simple Simple pause Tutorial 9












THIS IS Java scrip: GOOD 4 2D GAMES AND 3D GAMES !
Name script : pauseGame and copy - pass this down text
----------------------------------------­­­­-------------------------------------­-­-­-­------



#pragma strict

private var pauseGame : boolean = false;


function Update()
{
if(Input.GetKeyDown("p"))
{
pauseGame = !pauseGame;

    if(pauseGame == true)
    {
    Time.timeScale = 0;
    pauseGame = true;
    GameObject.Find("Main Camera").GetComponent(MouseLook).enabled = false;
    GameObject.Find("First Person Controller").GetComponent(MouseLook).enabled = false;
   
    }
    }
 
    if(pauseGame == false)
    {
    Time.timeScale = 1;
    pauseGame = false;
    GameObject.Find("Main Camera").GetComponent(MouseLook).enabled = true;
    GameObject.Find("First Person Controller").GetComponent(MouseLook).enabled = true;
   
   
    }
}


----------------------------------------­­---------------------------------------­-­-

Or Try This Alternative  Java  Script  : Add 2 cam and press P :)
---------------------------------------------------------------------------------

//*
//*

var paused : boolean = false;

function Update () {

if(Input.GetKeyDown("p") && paused == false) {  
paused = true;
Time.timeScale = 0;
        }
        else if(Input.GetKeyDown("p") && paused == true) {
                paused = false;
                Time.timeScale = 1;
       }  
}


---------------------------------------------------------------------------------


Copyright Free Music in this video by:

Song: Virtual Riot - Energy Drink
» Download:
http://bit.ly/RebornDownload

Creative Commons License
http://creativecommons.org/licenses/b...

Artist's Links:
Virtual Riot - Energy Drink

http://www.facebook.com/virtualriotmusic
http://www.soundcloud.com/virtual-riot

Monday, 26 January 2015

Unity3D Simple Cutscene Creator Tutorial 8

Unity3D Simple Cutscene Creator











    THIS IS C# scrip: GOOD 4 2D GAMES AND 3D GAMES ! 
    ----------------------------------------­­­­-------------------------------------­-­-­-­---



using UnityEngine;
using System.Collections;

public class SimpleCinematicScript : MonoBehaviour {

CameraFollow cFollow;
PlayerMove pMove;

public Transform Target1;
public Transform Target2;

public Vector3 Target1Offset;
public Vector3 Target2Offset;

public float Target1FollowSpeed;
public float Target2FollowSpeed;

public float DelayStart=0;
public float ShowTarget1ThisLong=0;
public float ShowTarget2ThisLong=0;

private Transform OriginalTarget;
private Vector3 OriginalTargetOffset;
private float OriginalTargetFollowSpeed;

public bool OnlyTriggerOnce=true;

    //Cinematic routine! It'll change our values of the camera follow one at a time
    IEnumerator StartCinematic()
    {
    //Let's wait a delay amount of time to start.
    yield return StartCoroutine(Wait(DelayStart));
   
    //Let's disable our player movement and set our rigidbody to kinematic so it won't move...
    pMove.enabled=false;
    pMove.gameObject.GetComponent<Rigidbody>().isKinematic=true;
   
    //Let's set our followspeed, target and target offset to our first cinematic target.
    cFollow.followSpeed=Target1FollowSpeed;
    cFollow.target=Target1;
    cFollow.targetOffset=Target1Offset;
   
    //wait a bit
    yield return StartCoroutine(Wait(ShowTarget1ThisLong));
   
    //Set to our second target
    cFollow.followSpeed=Target2FollowSpeed;
    cFollow.target=Target2;
    cFollow.targetOffset=Target2Offset;
        
        //wait a bit more
        yield return StartCoroutine(Wait(ShowTarget2ThisLong));
        
        //Reset to the values we had before starting the cinematic.
        cFollow.followSpeed=OriginalTargetFollowSpeed;
    cFollow.target=OriginalTarget;
    cFollow.targetOffset=OriginalTargetOffset;
   
    //Enable the player movement back, and set the rigid body iskinematic to false so the rigid body will work again.
pMove.enabled=true;
pMove.gameObject.GetComponent<Rigidbody>().isKinematic=false;

//Now, if we want to trigger this again, and not only once...
if(!OnlyTriggerOnce){
//We'll wait 5f seconds
yield return StartCoroutine(Wait(5f));
//and re-enable the trigger :D
gameObject.collider.enabled=true;
}
    }

//This is a fancy wait coroutine for the others to use.
IEnumerator Wait(float duration)
    {
        for (float timer = 0; timer < duration; timer += Time.deltaTime)
            yield return 0;
    }

//We should trigger if the player enters our trigger
void OnTriggerEnter(Collider other) {
//If what entered our trigger has the TAG Player...
if(other.gameObject.tag=="Player") {
//Let's ask the Camera to give us their Camera Follow component to mess with!
cFollow = Camera.main.GetComponent<CameraFollow>();
//Let's set the original values that are there right now so we can get back to it later.
OriginalTarget=cFollow.target;
OriginalTargetOffset=cFollow.targetOffset;
OriginalTargetFollowSpeed=cFollow.followSpeed;
//Also let's set our PlayerMove Script to be the Player that just touched us. So we can disable him.
pMove=other.gameObject.GetComponent<PlayerMove>();
//And let's turn this trigger off because... I don't want this being triggered while it's playing the cinematic
//If that happens I'll be in trouble since I won't have the original values anymore
gameObject.collider.enabled=false;
//And finally... Let's start the Cinematic!
StartCoroutine(StartCinematic());
}
}

}






----------------------------------------­­­--------------------------------------­-­-­-

Copyright Free Music in this video by:

Song: Virtual Riot - Energy Drink
» Download:
http://bit.ly/RebornDownload

Creative Commons License
http://creativecommons.org/licenses/b...

Artist's Links:
Virtual Riot - Energy Drink

http://www.facebook.com/virtualriotmusic
http://www.soundcloud.com/virtual-riot



















































Tuesday, 20 January 2015

Unity3D Make moving platform





Unity3D Make moving platform











THIS IS C# scrip: GOOD 4 2D GAMES AND 3D GAMES !
----------------------------------------­­­­-------------------------------------­-­-­-­----------------






using UnityEngine;
using System.Collections;
using System.Collections.Generic;

//moves object along a series of waypoints, useful for moving platforms or hazards
//this class adds a kinematic rigidbody so the moving object will push other rigidbodies whilst moving
[RequireComponent(typeof(Rigidbody))]
public class MoveToPoints : MonoBehaviour
{
public float speed; //how fast to move
public float delay; //how long to wait at each waypoint
public type movementType; //stop at final waypoint, loop through waypoints or move back n forth along waypoints

public enum type { PlayOnce, Loop, PingPong }
private int currentWp;
private float arrivalTime;
private bool forward = true, arrived = false;
private List<Transform> waypoints = new List<Transform>();

//setup
void Awake()
{
//add kinematic rigidbody
if(!rigidbody)
gameObject.AddComponent("Rigidbody");
rigidbody.isKinematic = true;
rigidbody.useGravity = false;
rigidbody.interpolation = RigidbodyInterpolation.Interpolate;

//get child waypoints, then detach them (so object can move without moving waypoints)
foreach (Transform child in transform)
if(child.tag == "Waypoint")
waypoints.Add (child);
if(waypoints.Count == 0)
Debug.LogError("No waypoints found for 'MoveToPoints' script. To add waypoints: add child gameObjects with the tag 'Waypoint'", transform);
transform.DetachChildren();
}

//if we've arrived at waypoint, get the next one
void Update()
{
if(waypoints.Count > 0)
{
if(!arrived)
{
if (Vector3.Distance(transform.position, waypoints[currentWp].position) < 0.3f)
{
arrivalTime = Time.time;
arrived = true;
}
}
else
{
if(Time.time > arrivalTime + delay)
{
GetNextWP();
arrived = false;
}
}
}
}

//move object toward waypoint
void FixedUpdate()
{
if(!arrived && waypoints.Count > 0)
{
Vector3 direction = waypoints[currentWp].position - transform.position;
rigidbody.MovePosition(transform.position + (direction.normalized * speed * Time.fixedDeltaTime));
}
}

//get the next waypoint
private void GetNextWP()
{
if(movementType == type.PlayOnce)
{
currentWp++;
if(currentWp == waypoints.Count)
enabled = false;
}

if (movementType == type.Loop)
currentWp = (currentWp == waypoints.Count-1) ? 0 : currentWp += 1;

if (movementType == type.PingPong)
{
if(currentWp == waypoints.Count-1)
forward = false;
else if(currentWp == 0)
forward = true;
currentWp = (forward) ? currentWp += 1 : currentWp -= 1;
}
}

//draw gizmo spheres for waypoints
void OnDrawGizmos()
{
Gizmos.color = Color.cyan;
foreach (Transform child in transform)
{
if(child.tag == "Waypoint")
Gizmos.DrawSphere(child.position, .7f);
}
}
}

/* NOTE: remember to tag object as "Moving Platform" if you want the player to be able to stand and move on it
 * for waypoints, simple use an empty gameObject parented the the object. Tag it "Waypoint", and number them in order */







---------------------------------------------------------------------------------

AND THIS IS BONUS EXTRA SCRIPT THAT IS NOT IN VIDEO .
THIS WILL STICK PLAYER 2 PLATFORM
OPEN NEW C# AND COPY PAST THIS :
THEN ADD THIS 2 YOUR PLATFORM .
--------------------------------------------------------------------------------

using UnityEngine;
using System.Collections;

public class HoldCharacter : MonoBehaviour {

void OnTriggerEnter(Collider col) {
col.transform.parent = gameObject.transform;
}

void OnTriggerExit(Collider col) {
col.transform.parent = null;
}
}


----------------------------------------­­---------------------------------------­-­-

Copyright Free Music in this video by:

Song: Virtual Riot - Energy Drink
» Download:
http://bit.ly/RebornDownload

Creative Commons License
http://creativecommons.org/licenses/b...

Artist's Links:
Virtual Riot - Energy Drink

http://www.facebook.com/virtualriotmusic
http://www.soundcloud.com/virtual-riot

Monday, 19 January 2015

Unity3D Make Unstable Platform




Unity3D Make Unstable Platform














THIS IS C# scrip: GOOD 4 2D GAMES AND 3D GAMES !
----------------------------------------­­­--------------------------------------­-­-­----------------


using UnityEngine;
using System.Collections;

public class UnstablePlatform : MonoBehaviour {

        //We'll need to turn off and on our renderer for this
        Renderer PlatformMesh;
     
        //How much time until we disappear?
        public float TimeToDisappear=1f;
        //How much time until we come back?
        public float TimeToComeBack=6f;
     
        //How much time until we come back?
        public float TimeToDisappearIndependentOfPlayer=3f;
        //If we want this to be appearing and disappearing independent of player contact.
        public bool PlayerIndependent = false;
     
        //It's the start of the game!
        void Start() {
                //Let's get a reference to our renderer so we can turn it on and off
                PlatformMesh = GetComponent<Renderer>();
                //If we're player independent...
        if(PlayerIndependent) {
                //We should start counting to disappear
                StartCoroutine(PlayerIndependentDisappearing());
        }
        }
     
        //This coroutine will do the blinking over time
        IEnumerator DoTheBlinking()
    {
        //Start false, wait for X time, than go true, and then false, and...
        PlatformMesh.enabled=false;
        yield return StartCoroutine(Wait(TimeToDisappear*0.1f));
        PlatformMesh.enabled=true;
        yield return StartCoroutine(Wait(TimeToDisappear*0.3f));
        PlatformMesh.enabled=false;
        yield return StartCoroutine(Wait(TimeToDisappear*0.2f));
        PlatformMesh.enabled=true;
        yield return StartCoroutine(Wait(TimeToDisappear*0.1f));
        PlatformMesh.enabled=false;
        yield return StartCoroutine(Wait(TimeToDisappear*0.05f));
        PlatformMesh.enabled=true;
        yield return StartCoroutine(Wait(TimeToDisappear*0.025f));
        PlatformMesh.enabled=false;
        yield return StartCoroutine(Wait(TimeToDisappear*0.02f));
        PlatformMesh.enabled=true;
        yield return StartCoroutine(Wait(TimeToDisappear*0.01f));
        PlatformMesh.enabled=false;
        //Now that we're finally gone, turn collider off
        gameObject.collider.enabled=false;
        //If the developer wants it to come back (TimeToComeBack bigger than 0...)
        if(TimeToComeBack>0) {
                //Let's start our ComeBack Routine
                StartCoroutine(ComeBack());
        }
    }
 
    //This one is in case you want this to go on and off constantly without player interaction
    IEnumerator PlayerIndependentDisappearing()
    {
        //It'll wait for the Time To Disappear time, than call the DoTheBlinking coroutine.
        yield return StartCoroutine(Wait(TimeToDisappearIndependentOfPlayer));
        yield return StartCoroutine(DoTheBlinking());
    }
 
    //Come back routine! Like the disappearing one but opposite!
    IEnumerator ComeBack()
    {
        //It'll wait for the Time To ComeBack time, than blink a bit.
        yield return StartCoroutine(Wait(TimeToComeBack));
        yield return StartCoroutine(Wait(TimeToDisappear*0.1f));
        PlatformMesh.enabled=true;
        yield return StartCoroutine(Wait(TimeToDisappear*0.3f));
        PlatformMesh.enabled=false;
        yield return StartCoroutine(Wait(TimeToDisappear*0.2f));
        PlatformMesh.enabled=true;
        yield return StartCoroutine(Wait(TimeToDisappear*0.1f));
        PlatformMesh.enabled=false;
        yield return StartCoroutine(Wait(TimeToDisappear*0.05f));
        PlatformMesh.enabled=true;
        //And now we enable our collider again.
        gameObject.collider.enabled=true;
        //If we're player independent...
        if(PlayerIndependent) {
                //We should start counting to disappear again.
                StartCoroutine(PlayerIndependentDisappearing());
        }
    }

        //This is a fancy wait coroutine for the others to use.
        IEnumerator Wait(float duration)
    {
        for (float timer = 0; timer < duration; timer += Time.deltaTime)
            yield return 0;
    }

        //We should blink and disappear if the player collides with us
        void OnCollisionEnter(Collision other) {
                //If we're player independent, just stop this D:
                if(PlayerIndependent) {
                return;
        }
        if(other.gameObject.tag=="Player") {
                StartCoroutine(DoTheBlinking());
        }
    }
}

----------------------------------------­----------------------------------------­-

Copyright Free Music in this video by:

Song: Virtual Riot - Energy Drink
» Download:
http://bit.ly/RebornDownload

Creative Commons License
http://creativecommons.org/licenses/b...

Artist's Links:
Virtual Riot - Energy Drink

http://www.facebook.com/virtualriotmusic
http://www.soundcloud.com/virtual-riot

Unity 3d spawn a prefab




Unity 3d spawn a prefab





Making free platform game ! One man show
----------------------------------------­­­--------------------------------------­-­-­------------------------------------­----------------
Javascrip: GOOD 4 2D GAMES AND 3D GAMES ! 
----------------------------------------­­­--------------------------------------­-­-­------------------------------------­----------------

var node1 : Transform;
var block : GameObject;
var spawning : boolean = true;

function Start () {
spawnBlock();
}

function Update () {

}

function spawnBlock () {

while(spawning) {
yield WaitForSeconds(1);
Instantiate(block,node1.transform.positi­on,node1.transform.rotation);
}
}




----------------------------------------­----------------------------------------­-

Copyright Free Music in this video by:

Song: Virtual Riot - Energy Drink
» Download:
http://bit.ly/RebornDownload

Creative Commons License
http://creativecommons.org/licenses/b...

--------------------------------------

Artist's Links:
Virtual Riot - Energy Drink

http://www.facebook.com/virtualriotmusic
http://www.soundcloud.com/virtual-riot

Unity 3D Play Audio Sound OnTriggerEnter




Unity 3D Play Audio Sound OnTriggerEnter





Making free platform game ! One man show

----------------------------------------­----------------------------------------­---
Javascrip: GOOD 4 2D GAMES AND 3D GAMES !
----------------------------------------­----------------------------------------­---


var soundFile:AudioClip;


function OnTriggerEnter(trigger:Collider) { if(trigger.collider.tag=="Player&qu­ot;) { audio.clip = soundFile; audio.Play(); }

}


---------------------------------------------------------------

Dear members  here is alternatives !


All Java Scripts  name it how you like !


------------------------------------------------------------------------------------

First Java script is for looping music after trigger enter :
------------------------------------------------------------------------------------
var Sound :AudioClip;
function OnTriggerEnter() {
audio.clip = Sound;
audio.Play();
}
function OnTriggerExit(){
audio.Stop();
}



-----------------------------------------------------------------------------------
Second Java script is for sounds to fire only once:
-----------------------------------------------------------------------------------
private var hasPlayed : boolean = false;
var Sound : AudioClip;
function OnTriggerEnter() {
if(!hasPlayed){
audio.clip = Sound;
audio.Play();
hasPlayed = true;
}
}




------------------------------------------------------------------------------------------------------------
Third Java script is for trigger sounds (fire every time you enter a trigger):
------------------------------------------------------------------------------------------------------------

var Sound : AudioClip;
function OnTriggerEnter() {
audio.clip = Sound;
audio.Play();
}



made with ezvid, free download at http://ezvid.com

Unity 3d Triggered Animation using Javascript



Unity 3d Triggered Animation using Javascript in Unity 3d FREE SCRIPT




Making free platform game ! One man show
----------------------------------------­----------------------------------------­---
Javascrip: GOOD 4 2D GAMES AND 3D GAMES !
----------------------------------------­----------------------------------------­---



var doorClip : AnimationClip; function OnTriggerEnter (player : Collider) { if(player.tag=="Player") GameObject.Find("YOUR Door NAME HERE ").animation.Play("YOUR DoorOpen ANIMATION NAME HERE "); }


made with ezvid, free download at http://ezvid.com

Wednesday, 14 January 2015

SOME OF THE PICTURES DURING THE DEVELOPMENT PROCESS

























































































All suggestions and questions feel free to ask or leave a tip...




idea Done By me and I know that it is not a revolutionary new idea :)

concept Done By me same text here :)

Photoshop Done By me :)

C# programming Done By me and great Unity community with tips :)

java programming Done By me and great Unity community with tips :)

Now that I have performed dose of my bullshit TEXT ...
The best thing realy is that game will be  free AND WHY YOU ASK ? :
HONEST meaning ,leave something CREATIVE behind when you are gone...

AND MUSIC UHH ...

Background music PLAYING STILL not performed , so if someone wants With his MP3 help FREE GOOD I PUT THE  NAME OF THE AUTHOR  GOES TO THE CREDIT COLUMN IN GAME ....

AND FINALLY
If you have any tips and ideas freely PUT IN COMMENTS

And mesage 2 all haters gonna hate is   .i.