Results 1 to 5 of 5
  1. #1
    Nintendo Section Moderator PvtRyan's Avatar

    Badge

    Join Date
    Jul 2011
    Location
    Coding Wii
    Posts
    3,837
    Points
    1,586
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    Coding Wii
    Posts
    3,837
    Points
    1,586
    Gamer IDs

    PSN ID: gamer_pvtryan Steam ID: pvtryan_cl Wii Code: PvtRyan

    Contact info:

    Youtube Channel: http://www.youtube.com/xPvtRyanx

    Default [TUT]Making a set amount of Lives

    Legend:
    What Can be changed to the Users need.

    So to begin we start with the init
    Code:
    	setDvar( "onlinegame", 1 );
    	setDvar( "xblive_privatematch", 0 );
    I use this ^^^ in my gametypes so people cannot switch team, the change team dvar never works for me.
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------
    So lets start with our lives variable which would go in the onPlayerConnected.

    In the onPlayerConnected you should have it set up as:

    Code:
    player thread lives();
    -----------------------------------------------------------------------------------
    Lets move onto the script. The variable script should look like this.
    Code:
    lives()
    {
    	self.giveLife = 5;
    }
    --------------------------------------------------------------------------------------------------
    Now you want it so if you die, you lose your lives so then you would add this script into the OnPlayerSpawned.
    Code:
    self thread loseLife();
    ---------------------------------------------------------------------
    The script would look like this:
    Code:
    loseLife()
    {
    	self waittill( "death" );
    	
    	self.giveLife -= 1;
    }
    ----------------------------------------------------------------------
    Now that you have lost a life. We need to make it so if you lose all your lives your dead.
    So we would put this script in the OnPlayerSpawned.
    Code:
    self thread loseAllLives();
    -----------------------------------------------------------------------
    The final script would look like this:
    Code:
    loseAllLives()
    {
    	self endon ( "disconnect" );
    
    	switch( self.giveLife-- )
    	{
    		case 0:
    			break;
    		case 1:
    			break;
    		case 2:
    			break;
    		case 3:
    			break;
    		case 4:
    			self [[level.spectator]]();
    			break;
    	}
    }
    For more or less lives, you will delete the cases as the numbers vary, 0 counts as the first one so always start out with 0.

    0 Not allowed! Not allowed!


    PS4 Profile:

  2. #2
    Suicidal Thoughts
    Atmosphere's Avatar
    Join Date
    Oct 2012
    Location
    Oceans Ate Alaska
    Posts
    3,648
    Points
    2,290
         User Info     Contact     Gamer ID
    Join Date
    Oct 2012
    Location
    Oceans Ate Alaska
    Posts
    3,648
    Points
    2,290
    Gamer IDs

    Gamertag: xINSTANT CRUSHx Steam ID: xatmospherex

    Default

    You are getting better with tutorials!
    Nice Job Ryan!

    0 Not allowed! Not allowed!

  3. #3
    1010010011010101101001
    Austin .'s Avatar
    Join Date
    May 2011
    Location
    Where the Green Grass Grows. <3
    Posts
    4,830
    Points
    2,134
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Where the Green Grass Grows. <3
    Posts
    4,830
    Points
    2,134
    Gamer IDs

    PSN ID: x-CrimsoN-x21

    Contact info:

    Youtube Channel: http://www.youtube.com/user/xCrimmYx?feature=mhee

    Default

    http://www.codeleakers.com/forumdisp...164-Wii-Guides

    ...

    http://www.codeleakers.com/forumdisplay.php?164-Wii-Guides

    ...

    http://www.codeleakers.com/forumdisplay.php?164-Wii-Guides

    Jesus christ dude I swear this is the 3rd thread of yours we have had to move because of this. Holy fuck. Lrn2post.

    0 Not allowed! Not allowed!

    1v1 (as of June) :
    Wins: 2 Losses: 0
    We accept the love we think we deserve.

  4. #4
    Nintendo Section Moderator PvtRyan's Avatar

    Badge

    Join Date
    Jul 2011
    Location
    Coding Wii
    Posts
    3,837
    Points
    1,586
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    Coding Wii
    Posts
    3,837
    Points
    1,586
    Gamer IDs

    PSN ID: gamer_pvtryan Steam ID: pvtryan_cl Wii Code: PvtRyan

    Contact info:

    Youtube Channel: http://www.youtube.com/xPvtRyanx

    Default

    Quote Originally Posted by Austin . View Post
    http://www.codeleakers.com/forumdisp...164-Wii-Guides

    ...

    http://www.codeleakers.com/forumdisplay.php?164-Wii-Guides


    ...

    http://www.codeleakers.com/forumdisplay.php?164-Wii-Guides

    Jesus christ dude I swear this is the 3rd thread of yours we have had to move because of this. Holy fuck. Lrn2post.


    This was a mod so i found it as a wii mod help.

    0 Not allowed! Not allowed!


    PS4 Profile:

  5. #5
    1010010011010101101001
    Austin .'s Avatar
    Join Date
    May 2011
    Location
    Where the Green Grass Grows. <3
    Posts
    4,830
    Points
    2,134
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Where the Green Grass Grows. <3
    Posts
    4,830
    Points
    2,134
    Gamer IDs

    PSN ID: x-CrimsoN-x21

    Contact info:

    Youtube Channel: http://www.youtube.com/user/xCrimmYx?feature=mhee

    Default

    It's a guide though, and belongs in that section. No one is going to look through this section for a tutorial. Moved though, thanks Beav.

    1 Not allowed! Not allowed!

    1v1 (as of June) :
    Wins: 2 Losses: 0
    We accept the love we think we deserve.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 05:30 PM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.