Announcement

Collapse
No announcement yet.

Making attached actors fall

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

  • Making attached actors fall

    I currently have attached a key to a NPC on my map such that thieves have the oppurtunity to pick his pocket. Works fine unless the NPC is killed/Ko'ed, at which point, the key floats in mid air. A minor glitch, one I am willing to live with, but would like to correct if easy enough.

    On another note, Have not tried this with a gaurd yet, but intend too. Would add either an extra key or some loot. Anyone try this and know what happens if someone spawns into that guard?

    I am hoping there is some setting I missed here in the actor properties. Thoughts?
    Give some taffer fire, and you'll keep him warm for the night with one less reason to cause trouble for the master.
    Set a taffer on fire, and he will be warm for the rest of his life, and have no need to bother the master.

  • #2
    Sounds good
    -TuF- Emptying clan servers of their own clan members since 2010
    - Agg moderator campaign supporter 2011
    - #2 of 3 LANers of the Apocalypse!
    -YT

    Comment


    • #3
      spawning as that guard should still have it attatched to you. (I think). Cool idea though. I would imagine the problem is the same as horizontal door handles and how they refuse to move properly. I had wondered about this only a week ago oddly enough but I never noticed an Attatch tag in the bot settings and I didnt want to code one in
      [E.D.G] "Eaves Droppers Guild - we're on the edge."

      All New Thievery-O's!

      Comment


      • #4
        Yeah, it's the same thing as the door handles. Attached actors only seem to follow horizontal movement. If the object moves vertically, the actor will stay in place.
        It's not my fault everything you like is terrible.

        Comment


        • #5
          Forgot about that vertical movement issue. Did a quick look on UNrealWikki and came up wiht this:

          http://wiki.beyondunreal.com/wiki/ActorAttacher

          Will try this and see how it works.

          Thie issue with players spawning into guards is does the spawing event keep certain propeties the same, reset all properties, or remove the current guard actor and replace it with a new one. I suspect the former, but do not know. If that is the case, would be nice if the key/loot would fall on the floor.
          Give some taffer fire, and you'll keep him warm for the night with one less reason to cause trouble for the master.
          Set a taffer on fire, and he will be warm for the rest of his life, and have no need to bother the master.

          Comment


          • #6
            I've been experimanting wiht this myself (and havn't fugured out how to let the dude's pocket be pickable yet)

            I've tried telling the AI that it has 1000 gold in his pocket. It works, and he has the cash. However, when killed/KOed, the loot is deleted: not dropped, not floating, it jsut ceases to exist. Go figure.


            Anyways, if you're actually physically placing a key inside the AI's body, and having it follow the dude around, then you had better watch out for roatation. it'll sometimes lag behind the dude a little, resulting in a floating key on the guy's back. Like the following buttons in Aquatone.

            I know that the LootSpawnerSlave has an option of bDropstogropundwhenspawned. I know what you can set a lootspawner to be triggered, and triggers can be set off by killing a creature (same works wiht Koing). In theory, if you set the bot's tag to "ihaveakey" or something like that, and the lootspawner master's event to "ihaveakey" (or is it the other way around?) that it SHOULD spawn a key when the bot is killed/KOed. The key, (as said in the settings of the lootspawnerslave that's attached to the guard) sould drop to the ground.

            Also, you can have the Lootspawnermaster automatically spawn a key at the AI's starting place. YOu do't have to set the attachtag for the bot to that of the slavespawner, but instead use the Mastaer's handy little "Spawned itemTag" function to have an attachtag, and set the spawnerslave to bdroptoground: TRUE.
            IN THEORY, this should make a key spawn at the guard's waist or whatever, and when the killing action is commenced, and the key is no longer attached to hte guard, then it should do as it's told and drop to the ground.


            At least, that's how it SHOULD work, i havn't tested these out yet.. YOu can use either way, but just don't mix them, or you'll meess up the ma ppermenantly. Lootspawners are a nice way to get done a bunch of junk, but are buggy if you tell it to do too much.


            Oh, and if you don't understand what i've said, then tell me to repeat it.
            "Just off the border of your waking mind there lies another time, where darkness and light are one. As you tread the halls of sanity, you feel so glad to be unable to go beyond. I have a message from another time."

            Comment


            • #7
              Originally posted by Radamanthus
              I've tried telling the AI that it has 1000 gold in his pocket. It works, and he has the cash. However, when killed/KOed, the loot is deleted: not dropped, not floating, it jsut ceases to exist. Go figure.
              Uh, I'm pretty sure when a guard has loot, it means that they returned it. Check if there is an extra 1000 loot in the level...
              Or, maybe it just isn't implemented.
              It's not my fault everything you like is terrible.

              Comment


              • #8
                The loot would be placed in the map "on" the NPC's "hip" using either the attach tag or the attach actor mentioned above. I have already done this with a key, loot should be no different. Using the basic attach tag, the key tracks just fine as the NPC runs/jumps all over the place. Have not made the NPC go or down a level though. As the key is frobable, it works just like in Thief.

                The lootspawner is something I have considered, assumning it can be attached, and the items it generates attached. It would have to be destroyed/deactivated in the event of KO/Death.

                Another fun thing might occur if the thief does not get whatever object is attached to the guared after KO'ing, and the KO'ed body gets moved. If the guard wakes up, and the key/loot is still attached, you'll get ghost key/loot!
                Give some taffer fire, and you'll keep him warm for the night with one less reason to cause trouble for the master.
                Set a taffer on fire, and he will be warm for the rest of his life, and have no need to bother the master.

                Comment


                • #9
                  Originally posted by Thebos
                  The lootspawner is something I have considered, assumning it can be attached
                  I'm pretty sure anything can be attached if you do it right, but sometimes you have to change the advanced settings of hte object to bstatic: FALSE

                  Originally posted by Thebos
                  and the items it generates attached.
                  There's an option for the LootSpawnerMaster called "SpawnedItemTag" It's meant to be used for a key's tag or something of the like, but saying that attachtags work quite teh same, as far as the attached item goes, it ought to work.
                  "Just off the border of your waking mind there lies another time, where darkness and light are one. As you tread the halls of sanity, you feel so glad to be unable to go beyond. I have a message from another time."

                  Comment


                  • #10
                    On the lootspwaner, what I wrote did not quite reflect what I meant. It may work, and I am confident the lootspawner can be attached (I believe I gave you the details how ), but I have some concerns that would requrie testing. The big one being would the loot spawned be attached to the same actor, or at least the lootspawn? or will it be a left in place while the NPC continues on his merry way?

                    Another option would be the loot destroyer I think. Again, I have yet to sit down to learn these things so I do not know there capabilities. Proper loot distribution will probably be the last thing I do.
                    Give some taffer fire, and you'll keep him warm for the night with one less reason to cause trouble for the master.
                    Set a taffer on fire, and he will be warm for the rest of his life, and have no need to bother the master.

                    Comment


                    • #11
                      The loot destroyer wouldn't work, YOu'd have to place the item like normal, and the lootdestroyer only works for loot anyway, so you havn't really adressed the problem at all.

                      Yes, the spawned loot should be attached ot the same acter, if you used the tag right.

                      I'll go test it now!
                      "Just off the border of your waking mind there lies another time, where darkness and light are one. As you tread the halls of sanity, you feel so glad to be unable to go beyond. I have a message from another time."

                      Comment


                      • #12
                        Not quite perfect yet, but:

                        [code:1:43efd554c4]//================================================== ===========================
                        // ThPickupCarriedKey
                        //================================================== ===========================

                        class ThPickupCarriedKey expands ThPickupNormalDoorKey;

                        var() Pawn Carrier;
                        var() vector LOffset;
                        var() rotator ROffset;

                        function PostBeginPlay()
                        {
                        if (Carrier != None)
                        {
                        // Allows manual placing of key:
                        if (LOffset == vect(0, 0, 0))
                        LOffset = Carrier.Location - Location;
                        if (ROffset == rot(0, 0, 0))
                        ROffset = Carrier.Rotation + Rotation;

                        SetPhysics( PHYS_None );
                        } else
                        SetPhysics( PHYS_Falling );
                        }

                        function Tick( float DeltaTime )
                        {
                        if (Carrier != None)
                        {
                        if (Carrier.Health <= 0)
                        {
                        Carrier = None;
                        SetPhysics( PHYS_Falling );
                        } else {
                        // Set location and rotation
                        SetLocation (Carrier.Location + vector(Carrier.Rotation) * LOffset);
                        SetRotation (Carrier.Rotation + ROffset);
                        }
                        }
                        }[/code:1:43efd554c4]
                        ]V[]V[

                        Comment


                        • #13
                          Not bad. Now, if the carrier is KO'd, does that set their health to 0? I think that if the carrier dies or is KO'd, the key should remain on their belt until it is taken...
                          It's not my fault everything you like is terrible.

                          Comment


                          • #14
                            Thanks MM- will give it a try this weekend.

                            I as understand it, when the health goes to 0, key then drops to floor, and oreints accordingly? If so, that is exactly what I was looking to do.

                            Thanks.
                            Give some taffer fire, and you'll keep him warm for the night with one less reason to cause trouble for the master.
                            Set a taffer on fire, and he will be warm for the rest of his life, and have no need to bother the master.

                            Comment


                            • #15
                              Originally posted by BiG_D
                              I think that if the carrier dies or is KO'd, the key should remain on their belt until it is taken...
                              Too difficult, methinks.

                              Originally posted by Thebos
                              I as understand it, when the health goes to 0, key then drops to floor, and oreints accordingly? If so, that is exactly what I was looking to do.
                              Not exactly. You attach the key by inserting the Pawn's Name (as found under Object) into the Carrier property, then either move the key to the correct location and rotation, or set the LOffset and ROffset manually. They key should then move like it was part of the Pawn model. When the carrier is KOd or killed, the key is dropped from where it is and with the same rotation.

                              Oh, and the 'not quite perfect yet' was quite the understatement. I'm not even sure if the key rotates the right way as the carrier turns...
                              ]V[]V[

                              Comment

                              Working...
                              X