Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Remove Weapons from players?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    the action is like
    InfoGameRules or something like that, i can never remember the correct name

    Comment


      #17
      You can prevent players from spawning with certain equipment in an even better way.

      In xPawn, this is in the default properties:
      Code:
         RequiredEquipment(0)="XWeapons.AssaultRifle"
         RequiredEquipment(1)="XWeapons.ShieldGun"
      By simply setting both these default entries to "" in your Mutator's PostBeginPlay(), you'll prevent any player from spawning with any weapon.
      Since this code is only executed once (as opposed to running every time a pawn is spawned), it's much more efficient. However, you should not do that if you want a player to spawn with the default weapons at some point during your game anyway.

      Comment


        #18
        Originally posted by Sarge-David View Post
        the action is like
        InfoGameRules or something like that, i can never remember the correct name
        You have to place a level properties actor for that, then you can add the embedded mutilators, make sure that you load up the .u file in unrealed before you try and add an embedded mutilators

        Comment


          #19
          Originally posted by Jrubzjeknf View Post
          You can prevent players from spawning with certain equipment in an even better way.

          In xPawn, this is in the default properties:
          Code:
             RequiredEquipment(0)="XWeapons.AssaultRifle"
             RequiredEquipment(1)="XWeapons.ShieldGun"
          By simply setting both these default entries to "" in your Mutator's PostBeginPlay(), you'll prevent any player from spawning with any weapon.
          Since this code is only executed once (as opposed to running every time a pawn is spawned), it's much more efficient. However, you should not do that if you want a player to spawn with the default weapons at some point during your game anyway.
          good to know. thanks. that could also be used to spawn players with additional weapons as well since RequiredEquipment is a 16 element array. make it interesting and add "RequiredEquipment(2)="XWeapons.Redeemer"

          Comment


            #20
            You can also try this:


            Code:
            class MutNoWeaponStuff extends Mutator;
            
            function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
            {
            	
            	bSuperRelevant = 0;
            	if ( xPawn(Other) != None )
            	{
            	    xPawn(Other).RequiredEquipment[0] = none;
                        xPawn(Other).RequiredEquipment[1] = none;
            	}
            	return true;
            }
            Dunno if this exact code will work, but I've done xPawn(Other).RequiredEquipment[0] = "DragonAssaultRifle.DragonAssaultRifle"; and it works just fine. Look up the phrase "RequiredEquipment" to see how it's used.

            Comment

            Working...
            X