Announcement

Collapse
No announcement yet.

Replace double damage with jetpack

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

    #16
    Can you just share compiled version, I think it will be very useable for all players))))

    Comment


      #17
      I did not know that MyMutator is reserved)

      Comment


        #18
        Making new one now)

        Comment


          #19
          Ok
          0. ModPackages=ReplaceUDamageWithJetpack
          1. Make \My Games\Unreal Tournament 3\UTGame\Src\ReplaceUDamageWithJetpack\Classes\Rep laceUDamageWithJetpack.uc 0 errors

          Code:
          class ReplaceUDamageWithJetpack extends UTMutator
              config(ReplaceUDamageWithJetpack);
          
          var config string InventoryClassString;
          var config float InventoryRespawnTime;
          var class<Inventory> InventoryClass;
          var array<Inventory> SpawnedInventories;
          
          // Returns true to keep this actor
          function bool CheckReplacement(Actor Other)
          {
              if (UTPickupFactory_UDamage(Other) != none)
              {
                  UTPickupFactory_UDamage(Other).InventoryType = InventoryClass;
                  UTPickupFactory_UDamage(Other).InitializePickup();
              }
              else if (Other.IsA(InventoryClass.Name))
              {
                  SpawnedInventories.AddItem(Inventory(Other));
                  if (!IsTimerActive('FixRespawn'))
                  {
                      // fix timer in the next tick
                      SetTimer(0.0001, false, 'FixRespawn');
                  }
              }
              return true;
          }
          
          function FixRespawn()
          {
              local Inventory Inv;
              local PickupFactory PF;
          
              // remove empty entries
              SpawnedInventories.RemoveItem(none);
          
              foreach SpawnedInventories(Inv)
              {
                  if (Pawn(Inv.Owner) != none)
                  {
                      foreach WorldInfo.RadiusNavigationPoints(class'PickupFactory', PF, Inv.Owner.Location, Pawn(Inv.Owner).GetCollisionRadius())
                      {
                          if (PF.IsInState('Disabled') || PF.bHidden || (UTPickupFactory(PF) != none && UTPickupFactory(PF).bIsDisabled))
                          {
                              if (PF.InventoryType == InventoryClass && InventoryClass.default.RespawnTime <= 0.0)
                              {
                                  PF.SetHidden(false);
                                  PF.SetCollision(PF.default.bCollideActors, PF.default.bBlockActors);
                                  PF.SetPickupHidden();
          
                                  if (UTPickupFactory(PF) != none)
                                  {
                                      UTPickupFactory(PF).bIsDisabled = false;
                                  }
                                  PF.GotoState('');
                                  PF.RespawnEffectTime = -InventoryRespawnTime;
                                  PF.GotoState('Sleeping');
                              }
                          }
                      }
                  }
              }
          
              // clear
              SpawnedInventories.Length = 0;
          }
          
          DefaultProperties
          {
              InventoryClassString="Jetpack.Jetpack_Inventory"
              InventoryRespawnTime=10.0
          }
          2. Move ini and script

          3. Enable mut

          4. and... nothing

          Comment


            #20
            Oops. The PostBeginPlay code was missing due to copy pasting.
            Code:
            class ReplaceUDamageWithJetpack extends UTMutator
                config(ReplaceUDamageWithJetpack);
            
            var config string InventoryClassString;
            var config float InventoryRespawnTime;
            var class<Inventory> InventoryClass;
            var array<Inventory> SpawnedInventories;
            
            event PostBeginPlay()
            {
                super.PostBeginPlay();
            
                InventoryClass = class<Inventory>(DynamicLoadObject(InventoryClassString, class'class'));
                if (InventoryClass == none) Destroy;
            }
            
            // Returns true to keep this actor
            function bool CheckReplacement(Actor Other)
            {
                if (UTPickupFactory_UDamage(Other) != none)
                {
                    UTPickupFactory_UDamage(Other).InventoryType = InventoryClass;
                    UTPickupFactory_UDamage(Other).InitializePickup();
                }
                else if (Other.IsA(InventoryClass.Name))
                {
                    SpawnedInventories.AddItem(Inventory(Other));
                    if (!IsTimerActive('FixRespawn'))
                    {
                        // fix timer in the next tick
                        SetTimer(0.0001, false, 'FixRespawn');
                    }
                }
                return true;
            }
            
            function FixRespawn()
            {
                local Inventory Inv;
                local PickupFactory PF;
            
                // remove empty entries
                SpawnedInventories.RemoveItem(none);
            
                foreach SpawnedInventories(Inv)
                {
                    if (Pawn(Inv.Owner) != none)
                    {
                        foreach WorldInfo.RadiusNavigationPoints(class'PickupFactory', PF, Inv.Owner.Location, Pawn(Inv.Owner).GetCollisionRadius())
                        {
                            if (PF.IsInState('Disabled') || PF.bHidden || (UTPickupFactory(PF) != none && UTPickupFactory(PF).bIsDisabled))
                            {
                                if (PF.InventoryType == InventoryClass && InventoryClass.default.RespawnTime <= 0.0)
                                {
                                    PF.SetHidden(false);
                                    PF.SetCollision(PF.default.bCollideActors, PF.default.bBlockActors);
                                    PF.SetPickupHidden();
            
                                    if (UTPickupFactory(PF) != none)
                                    {
                                        UTPickupFactory(PF).bIsDisabled = false;
                                    }
                                    PF.GotoState('');
                                    PF.RespawnEffectTime = -InventoryRespawnTime;
                                    PF.GotoState('Sleeping');
                                }
                            }
                        }
                    }
                }
            
                // clear
                SpawnedInventories.Length = 0;
            }
            
            DefaultProperties
            {
                InventoryClassString="Jetpack.Jetpack_Inventory"
                InventoryRespawnTime=10.0
            }
            Code:
            [MyMutator UTUIDataProvider_Mutator]
            ClassName=ReplaceUDamageWithJetpack.ReplaceUDamageWithJetpack
            FriendlyName=ReplaceUDamageWithJetpack
            Description=Replace UDamages with jetpack
            GroupNames=
            UIConfigScene=
            bStandaloneOnly=False
            BitValue=0
            bRemoveOn360=False
            bRemoveOnPC=False
            bRemoveOnPS3=False

            Comment


              #21
              https://drive.google.com/file/d/0B7F...ew?usp=sharing

              I compile give it name ReplaceUDamageWithJetpack by RattleSN4K3 and note you as Author. I allowed note myself as the idea of mut if you will not mind.

              Thanks and regard) I think now this is a full release.)))

              Comment


                #22
                Lol. Me as author... I don't mind it. Okay. Congratulations to your first mutator then .

                Comment


                  #23
                  Originally posted by RattleSN4K3 View Post
                  PS: I noticed several bugs with the mutator when you die.
                  i find the issue, when another player puckup your jetpack, and you get the new one jetpack, you can not controll your jetpack, but can control his jetpack.

                  How it can be fixed? Can you make a code that delete jetpack item after player die?

                  Comment


                    #24
                    At this stage, it would be easier to create a fix (and ask the original author for a release). Probalby, there is no easy fix possible (like you suggested).

                    Comment


                      #25
                      Originally posted by RattleSN4K3 View Post
                      At this stage, it would be easier to create a fix (and ask the original author for a release). Probalby, there is no easy fix possible (like you suggested).
                      jetpack is dead mod I think... but I will try to contact the author.

                      Comment


                        #26
                        Use the "Send Email" option.

                        Comment


                          #27
                          As i said, mod is dead. He was answered that he is not support it in years.

                          Comment


                            #28
                            There is a fix. I made one and Rumple made an even better one.

                            The jetpack mod was made using some funky code effort, it is recommended you avoid the jetpack mod at all costs and re-write a new one.
                            Our DoS demolition had the jetpack fix at some point - not sure if it still does

                            - I personally used the cicada vehicle, but Rumple's raptor version is alot better, he's a better coder.. If you have good ping join HeDsteem, or download the BloodShed Mod. if not hunt through my files or code your own. Then use the superduperweaponswitcher once its done.

                            Good luck

                            p.s. martin phoenix author of the jetpack has copyright for 51 years, that is a strangest copyright figure to have and the website has been dead for 7 years.. Me thinks you should just make a new one because you will never get a response.

                            Comment

                            Working...
                            X