1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

spawn without an enforcer?

Discussion in 'Programming' started by FireSlash, Oct 29, 2001.

  1. FireSlash

    FireSlash Whats a FireSlash?

    Joined:
    Feb 3, 2001
    Messages:
    4,300
    Likes Received:
    0
    im working on a small gametype, and i need players to have only a chainsaw. any way to do this?
     
  2. HOB

    HOB King of the Jungle

    Joined:
    Mar 14, 2000
    Messages:
    22
    Likes Received:
    0
    yea
     
  3. Magus

    Magus New Member

    Joined:
    Oct 7, 2001
    Messages:
    69
    Likes Received:
    0
    function AddDefaultInventory( pawn PlayerPawn )
    {
    if ( PlayerPawn.IsA('Spectator') || (bRequireReady && (CountDown > 0)) )
    return;

    // Spawn ChainSaw
    GiveWeapon(PlayerPawn, "Botpack.ChainSaw");
    }
     
  4. FireSlash

    FireSlash Whats a FireSlash?

    Joined:
    Feb 3, 2001
    Messages:
    4,300
    Likes Received:
    0
    i used
    Code:
    if ( aPlayer.IsA('Spectator') 
    		|| aPlayer.FindInventoryType(class'chainsaw') != None )
    		return;
    	c = Spawn(class'chainsaw',,, Location);
    	if (c != None)
    	{
    		c.bHeldItem = true;
    		c.GiveTo( aPlayer );
    		c.Activate();
    		aPlayer.SelectedItem = c;
    	}
    	enf = weapon(aplayer.FindInventoryType(class'botpack.enforcer'));
    	if (enf != None)
    		 aplayer.DeleteInventory(enf);
    thanks though.:)
     
  5. HOB

    HOB King of the Jungle

    Joined:
    Mar 14, 2000
    Messages:
    22
    Likes Received:
    0
    they can still have impact hammers and translocators
     

Share This Page